Please refer to Full-Stack Node.js MERN with the AWS Platform (2nd edition).
- Mongodb
- Express
- React, React-native
- Node
- Swagger document for API
- ES6
yarn install
- Create local database
mkdir local_db
- Create database newswatcherdb
- Create collection newswatcher
- Create a .env file
MONGODB_CONNECT_URL=mongodb+srv://username:password@url/test?retryWrites=true
LOCAL_MONGODB_CONNECT_URL=mongodb://localhost:27017/test
PORT=3000
JWT_SECRET=<You Secret>
NEWYORKTIMES_API_KEY=<You API Key>
GLOBAL_STORIES_ID=MASZTER_STORIES_DO_NOT_DELETE
MAX_SHARED_STORIES=30
MAX_COMMENTS=30
MAX_FILTERS=5
MAX_FILTER_STORIES=15
yarn run-db
yarn dev
The different eslint version in root may affect the react web so I change the version in package.json to 5.12.0
"eslint": "5.12.0",
Enable ES6 (and beyond) syntax with Node and Express
Express API with autogenerated OpenAPI doc through Swagger
Setting Up Swagger to API Test In a JavaScript Application
lsof -nP -i4TCP:27017 | grep LISTEN
pkill "mongod"
- Make strings as constants
- Error code as constants
- Local MongoDB