This README would normally document whatever steps are necessary to get your application up and running.
- Quick summary
- A Rest Server App in Node.js
- Version: 1.0
- Author
-
Summary of set up
npm install
-
Configuration of ".env" file
- Create a new file ".env" and add the content of ".example.env" into your new ".env" file
- PORT= -> In this variable add the port number where the server will run
- MONGOBD_CNN=mongodb+srv://:@.ml5uh.mongodb.net/test
- Go to https://cloud.mongodb.com and create an user
- Create a new cluster
- Add a new Database User, in the section SECURITY -> Database Access
- Get the connection string in the section DEPLOYMENT -> Databases, clicking in "Connect"
- Modify the the password in your connection string
- SECRETOPRIVATEKEY= -> In this variable create a secure password for the token generation
- GOOGLE_CLIENT_ID= -> In this variable set your google client id
- GOOGLE_SECRET_ID= -> In this variable set your google secret id
- CLOUDINARY_URL= -> In this variable set your "API Environment variable" of your account in https://cloudinary.com/
- Create a new file ".env" and add the content of ".example.env" into your new ".env" file
-
How to run the app?
node appnpm start
-
Dependencies
- "bcryptjs": "^2.4.3",
- "cloudinary": "^1.27.1",
- "cors": "^2.8.5",
- "dotenv": "^10.0.0",
- "express": "^4.17.1",
- "express-fileupload": "^1.2.1",
- "express-validator": "^6.13.0",
- "google-auth-library": "^7.10.1",
- "jsonwebtoken": "^8.5.1",
- "mongoose": "^6.0.12",
- "nodemon": "^2.0.14",
- "uuid": "^8.3.2"
-
Google autentication
- Go to https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid
- Create a new proyect in https://console.cloud.google.com/apis/dashboard
- Configure your OAuth Consent Screen https://console.cloud.google.com/apis/credentials/consent?project=your_proyect_name
- Create your credentials https://console.cloud.google.com/apis/credentials?project=your_proyect_name
- Modify the data-client_id in the /public/index.html file with your google client id
- Writing tests
- Code review
- Other guidelines
- Repo owner or admin
- Other community or team contact