FullStackJs
Full Stack Development on NodeJS, React and MongoDb
Initial Setup
npm init [makes ready for adding dependencies]
npm install express [web server]
npm install mongodb [drive to connect to mongodb]
npm install react react-dom [for front end]
npm install -D webpack webpack-cli [-d is dev dependecy; webpack bundles js to single js file for prodution]
npm install-D babel-loader @babel/cli @babel/core @babel/preset-env @babel/preset-react @babel/plugin-proposal-class-properties [modern js to ES5, @; in node; it is namespace]
npm install -D nodemon [monitors the file and restart node server]
npm install -d eslint babel-eslint eslint-plugin-react []
npm install prop-types [parts of react]
npm install -d @babel/node
if you have this package.json then
npm i
Create files
In CMD:
echo > src/index.js
echo > public/index.html [to host]
echo > api/index.js
In Mac: use touch
mongodb
Help
https://www.tutorialspoint.com/mongodb/mongodb_insert_document.htm https://github.com/mongodb/node-mongodb-native
Tips: To search an item in source code
git grep "" for example: git grep "id:" | grep -v Test