Backend project that allows a registered user to make a single comment on a daily news heading updated every 24 hours
- Create a Opinion platform
- Random topic generated daily
- User will be able to type a single opinion on the topic
- That will be rewritten once a new topic appears
- The name will be available dynamically
- All opinions will be rendered in the opinion page
- Root will require registration and login
- MongoDB-Atlas for Database
- Express Session for cookies and session
- Passport for Encryption, hash, salting, authentications
- Only those authenticated will see posts page
- NodeJS
- Express
- EJS
- PASSPORT
- THIRD-PARTY-NEWS-API
- EXPRESS-SESSION
- MONGODB
-
Download project and open it on your favorite IDE
-
On the terminal, run:
npm install
-
Once dependencies are downloaded, run the command:
node index.js
-
Alternatively, if nodemon is installed, run:
nodemon index.js
- Username: test@test.com
- Password: test
- At root, a welcome, log in button, and register button will be display.
- Register button will redirect to Register Route
- Log in button will redirect to Login Route
- If successful, redirect to Posts
- Else, Redirect to Register
- If Successfull, redirect to Posts
- Else, redirect to Log In
- If Session Over Redirect to Log In
- If LOGOUT Redirect to ROOT (Home)