gbowne1 / RadioLogger

A Radio Logging application build with NodeJS and ExpressJS
GNU General Public License v3.0
6 stars 6 forks source link

[BUG] Fix the dashboard route #85

Open gbowne1 opened 11 months ago

gbowne1 commented 11 months ago

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.

jzunigarce commented 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?

gbowne1 commented 11 months ago

yes I tried the changes.

gbowne1 commented 11 months ago

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.

gbowne1 commented 11 months ago

we should have a .env.example for new users too.

jzunigarce commented 11 months ago

The registration form has not yet uploaded the changes

jzunigarce commented 11 months ago

The web and api work in same port, remenber that both routes listening for the port of app node.

jzunigarce commented 11 months ago

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

gbowne1 commented 11 months ago

so I am seeing a bunch of changes that need to be made.

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.

jzunigarce commented 11 months ago

assign it to me

gbowne1 commented 11 months ago

oh and @jzunigarce the login.schema.js in /schemas needs to be username and password, not email and password

jzunigarce commented 11 months ago

@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

gbowne1 commented 11 months ago

Ok. Good to know that.

this reminds me I added these collections for future use:

sessions authlog sessionhistory usersession

For: