Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akunna1/nexus-social-media-app-2
Backend description of the Nexus Social Media App
https://github.com/akunna1/nexus-social-media-app-2
backend bcryptjs database expressjs mongodb mongoose nodejs
Last synced: 17 days ago
JSON representation
Backend description of the Nexus Social Media App
- Host: GitHub
- URL: https://github.com/akunna1/nexus-social-media-app-2
- Owner: akunna1
- Created: 2024-08-30T00:52:54.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T19:30:25.000Z (2 months ago)
- Last Synced: 2024-10-10T14:40:18.286Z (about 1 month ago)
- Topics: backend, bcryptjs, database, expressjs, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://akunnatechstudio.com
- Size: 301 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Backend structure featuring some codes
#### Goals
- Allow users signup and login to view the Home/Profile
- firstname: Astra
- lastname: Quanta
- email: [email protected]
- password: akunnaya1234$#### Steps
- Set up Mongodb locally i.e MongoDB Compass. database name: nexus_db. Collection name: users and run in on local host 27017
- local installation: npm install --save-dev nodemon, "scripts": {
"start": "nodemon server.js"
}
- Server.js
- npm start: starts the backend server.js file (runs on port 5000)- npm install axios in client folder
- Modify Register.jsx to make API requests that points to the correct url i.e http://localhost:5000/register
- Modify Login.jsx to make API requests that points to the correct url i.e http://localhost:5000/login
- start the frontend using npm run dev (runs on port 5173)- Testing successful!
#### Notes
- Server.js file provides the API endpoints and does not need to know about the frontend files
- Frontend files make HTTP requests to these endpoints to handle registration, login, and data fetching
#### Ports and Requests
- http://localhost:5173/: running in web browswer from VS Code terminal
- localhost:27017: running in mongodb compass
- http://localhost:5000: running in VS Code terminal
- http://localhost:5000/register --> defined in Register.jsx for POST request (frontend file)
- http://localhost:5000/login --> defined in Login.jsx for POST request (frontend file)