Original src:
https://github.com/bradtraversy/devconnector
Brad made a new version of this course in 2019
Original src v2:
https://github.com/bradtraversy/devconnector_2.0
My src v2:
https://github.com/marley-nodejs/MERN-Stack-Front-To-Back-v2.0
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
+-- create-react-app@1.5.2
`-- npm@6.0.1
$ npm list --depth=0
project@1.0.0 /project
+-- bcryptjs@2.4.3
+-- body-parser@1.18.3
+-- concurrently@3.5.1
+-- express@4.16.3
+-- gravatar@1.6.0
+-- jsonwebtoken@8.2.1
+-- mongoose@5.1.1
+-- nodemon@1.17.4
+-- passport@0.4.0
+-- passport-jwt@4.0.0
`-- validator@10.2.0
$ npm list --depth=0
client@0.1.0 /project/client
+-- axios@0.18.0
+-- classnames@2.2.5
+-- jwt-decode@2.2.0
+-- moment@2.22.1
+-- react@16.3.2
+-- react-dom@16.3.2
+-- react-moment@0.7.0
+-- react-redux@5.0.7
+-- react-router-dom@4.2.2
+-- react-scripts@1.1.4
+-- redux@4.0.0
`-- redux-thunk@2.2.0
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
Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат