Open gbowne1 opened 11 months ago
You pull the changes?. I work perfect with http://localhost:3000/dashboard/. In my local I am working with port 3001, we should put a configuration at the frontend level to manage env variables to work with the port that everyone wants. Could you try the login?
yes I tried the changes.
Both Login and Register need some more CSS and UI work, including more fields (gonna make an issue for this so I can track it.
Including includes the following fields:
Username or Email: This field allows the user to enter their username or email address associated with their account.
Password: This field is used for entering the password associated with the username or email.
Remember Me: This checkbox allows the user to choose whether they want the system to remember their login credentials for future visits.
Forgot Password: This link provides a way for users to reset their password if they have forgotten it. Sign In/Log In Button: This button triggers the authentication process and logs the user into the system.
Resgiter will have these fields: First Name: This field captures the user's first name.
Last Name: This field captures the user's last name.
Email Address: This field captures the user's email address, which is often used as a unique identifier for the account.
Password: This field captures the user's chosen password for account authentication.
Confirm Password: This field asks the user to re-enter the password to ensure accuracy.
Username: This field captures the user's desired username, which may be used for account identification.
I think some of the issues is that the api now requires 3001 and the follow, user and profile controllers still use 3000.
we could do
PORT=3000
API_PORT=3001
in .env
we could do something like this
const apiUrl = `http://localhost:${apiPort}/api`;
and the same with the app.
we should have a .env.example for new users too.
The registration form has not yet uploaded the changes
The web and api work in same port, remenber that both routes listening for the port of app node.
I put port 3001 because that's how I have my local, you can change it to 3000, so you can test what I upload a fix for .env variables in the front
so I am seeing a bunch of changes that need to be made.
ship a .env.example that people can rename to .env when they've cloned/forked the app.
the port thing is a bit disambiguous. It really needs a fix so that it can be used on any port in the 3000 - 3999 range that node likes.
the nodemon.json file in the /server folder/directory needs some work then.
there a couple other .env variables I see that I don't have or get, I searched for the _ in the entire codebase.
MONGODB_URI=mongodb://username:password@host:port/database PORT=3000 SESSION_SECRET=TinHttuZPx MONGO_PORT=27017 MONGO_HOST=localhost API_SECRET= <== NODE_ENV=development JWT_SECRET= <== JWT_KEY= <== NODE_ENV= <==
We could possibly use something like http://localhost:${apiPort}/api
and http://localhost:${port}/ I just wanted to reduce having to switch when I am running like a react dev sever that totally picks 3000 as its first choice.
assign it to me
oh and @jzunigarce the login.schema.js in /schemas needs to be username and password, not email and password
@gbowne1 we just need a schema for the model. We do not require login, registration scheme, because we do not have such models. We can add the Joi module to validate schema that are submitted by users. The user schema we currently have is for the user collection
Ok. Good to know that.
this reminds me I added these collections for future use:
sessions authlog sessionhistory usersession
For:
The route & path where the dashboard is currently displaying is http://localhost:3000/dashboard/dashboard.html but http://localhost:3000/dashboard/ does not display the dashboard.