Original src:
https://github.com/bradtraversy/devconnector
Host
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
$ docker -v
Docker version 18.03.0-ce, build 0520e24
Inside container:
$ node -v
v9.11.1
$ npm -v
6.0.1
Final project packages
$ npm list -g --depth=0
/usr/local/lib
+-- [email protected]
`-- [email protected]
$ npm list --depth=0
[email protected] /project
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
$ npm list --depth=0
[email protected] /project/client
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
Visual Studio Code Settings:
{
"editor.fontSize": 26,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"terminal.integrated.fontSize": 26,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"emmet.syntaxProfiles": {
"javascript": "jsx",
"javascript": "html"
},
"editor.formatOnSave": true,
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 10000,
"prettier.singleQuote": true
}
Visual Studio Code Plugins:
- ES7 React/Redux/React-Native/JS snippets
- Bracket Pair Colorizer
- Prettier formatter for Visual Studio Code
- Live Server
- Node.js Modules Intellisense
Chrome extensions:
- React Developer Tools
- Redux Developer Tools
- Allow-Control-Allow-Origin
$ cd /project/
$ npm init -y
$ npm install --save express mongoose passport passport-jwt jsonwebtoken body-parser bcryptjs validator
$ npm install --save-dev nodemon
$ npm run server
https://github.com/emerleite/node-gravatar
$ npm install --save gravatar
https://github.com/themikenicholson/passport-jwt
https://github.com/chriso/validator.js/
with
.populate("user", ["name", "avatar"])
# npm install -g create-react-app
# su - nodejs
$ cd /project/
$ create-react-app client
$ npm install --save-dev concurrently
$ npm run dev
https://fontawesome.com/get-started
# cd client/
# npm install --save react-router-dom
# cd client/
# npm install --save axios
# cd client/
# npm install --save classnames
# cd client/
# npm install --save redux react-redux redux-thunk
# npm install --save jwt-decode
https://tylermcginnis.com/react-router-protected-routes-authentication/
# cd client/
# npm install --save moment react-moment
$ cd client/
$ npm run build
# npm install -g serve
$ serve -s build -l 8080
Marley