https://github.com/soumavabanerjee/userprofile-mongodb-nodejs
User Profile api with image upload and image size validation including custom error handling and configuration middlewares
https://github.com/soumavabanerjee/userprofile-mongodb-nodejs
Last synced: 6 months ago
JSON representation
User Profile api with image upload and image size validation including custom error handling and configuration middlewares
- Host: GitHub
- URL: https://github.com/soumavabanerjee/userprofile-mongodb-nodejs
- Owner: SoumavaBanerjee
- Created: 2021-05-24T07:52:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-24T07:54:19.000Z (over 4 years ago)
- Last Synced: 2025-04-11T22:10:00.509Z (6 months ago)
- Language: JavaScript
- Size: 2.34 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Api endpoints:
- http://localhost:5000/api/profile (get all profiles)
- http://localhost:5000/api/profile/post (insert a single profile)
- http://localhost:5000/api/profile/update/:id (update the profile of an existing user)
# requirements:
- node (ver 14.16.1 up)
- mongodb(ver 4.4.6 up)# initializing project:
- cd into the directory
```bash
cd ~/project-directory/
```- install packages
```bash
npm install
```- run the project with nodemon
```bash
npm run dev
```# Environment
#### include them in .env file at root of project
- NODE_ENV: "production" or "development"
- MONGO_LOCAL_URI: "mongodb://localhost:27017/yourDbName"