Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fataldinazor/members_only
Backend: Authorization, passportjs, Express, EJS, PostgreSQL, Tailwind
https://github.com/fataldinazor/members_only
expressjs passportjs
Last synced: 3 days ago
JSON representation
Backend: Authorization, passportjs, Express, EJS, PostgreSQL, Tailwind
- Host: GitHub
- URL: https://github.com/fataldinazor/members_only
- Owner: fataldinazor
- Created: 2024-08-30T15:46:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T15:26:02.000Z (4 months ago)
- Last Synced: 2024-11-09T16:25:21.637Z (about 2 months ago)
- Topics: expressjs, passportjs
- Language: JavaScript
- Homepage: https://members-only-mdih.onrender.com
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Members Only Project
## To Start the Project
- Create a local PostgreSQL database.
- Create a `.env` file including `DATABASE_URL`, `PORT`, `SESSION_SECRET`, `ADMIN_SECRET`.
- Execute `psql mydatabase < node_modules/connect-pg-simple/table.sql`, changing `mydatabase` to the name of your database.
- Execute `node db/populatedb.js`.
- Execute `nodemon app.js`.## Information about the Project
- The Project is part of The Odin Project curriculum. It challenges to create an app to authenticate and authorize the user logging into the website using `passport.js`.
- The website asks for a signup, and the password is stored in the database by securing it with `bcrypt.js`.
- The website gives different authorizations to different users:
- When the user is not logged in, they can only see the messages but not the identity of the person who has written them, and they can't create their own messages on the website as well.
- When the user is logged in and has become a member, they can see the messages and who has written them by their username, and they can now also create and update their own messages.
- When the user has admin rights, they have all the rights a member has, and on top of that, they can also delete messages of others.