Git Product home page Git Product logo

turtlewolfe / notezfourthediton Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25.82 MB

Node.js Complete Reference Guide By Valentin Bojinov, David Herron , Diogo Resende December 2018 Node.js Complete Reference Guide is your one-stop solution to building highly scalable, single-language applications that share code between the server and client

JavaScript 80.46% HTML 17.59% CSS 1.13% TSQL 0.82%

notezfourthediton's Introduction

Notez

Chapter 05

V section 04

chapter 05
section 04
models views routes & partials

# curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
# curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# sudo apt purge nodejs
# sudo apt remove nodejs
# sudo apt-get install -y nodejs
npx express-generator --view=hbs --git notez
# npx [email protected] --view=hbs --git notez
cd notez && npm install
npm audit fix
git init
git add .
# npm i [email protected]
mkdir models
mkdir partials
touch models/Note.js
touch models/notes-memory.js
touch partials/header.hbs
touch routes/notes.js
touch views/noteedit.hbs
touch views/noteview.hbs
touch views/notedestroy.hbs
# DEBUG=notez:* npm start
git remote add origin https://github.com/TurtleWolf/Notez.git
git push -u origin master
git status

V section 05

chapter 05
section 05
styles.css


V section 06

chapter 05
section 06 package.json


Chapter 06


VI section 04

chapter 06
section 04
jQuery Poppers BootStrap & assets

npm i bootstrap jquery [email protected]
mkdir public/assets
mv public/images/ public/javascripts/ public/stylesheets/ public/assets/
npm start
npm run server1
npm run server2

VI section 06

chapter 06
section 06
Mobile-first with feather-icons

npm i feather-icons
npm start

VI section 07

chapter 06
section 07
slate theme

npm run dl-slate

Chapter 07


VII section 03

chapter 07
section 03
debug logging

REQUEST_LOG_FORMAT=common npm start
npm i rotating-file-stream
npm i fs-extra
# npm i util
DEBUG=express:* npm start

VII section 04

chapter 07
section 04
mjs modules

mv app.js app.mjs
mv bin/www bin/www.mjs
# cd models
mv models/Note.js models/Note.mjs
mv models/notes-memory.js models/notes-memory.mjs
# cd routes
mv routes/index.js routes/index.mjs
mv routes/notes.js routes/notes.mjs
# npm i esm
# npm -r esm start
# npm uninstall esm

VII section 05

chapter 07
section 05
storage file_system

import * as notes from '../models/notes-memory.mjs';
import * as notes from '../models/notes.mjs';
npm run start-fs
npm run server1
npm run server2

VII section 06

chapter 07
section 06
storage LevelUP

 npm i level
 touch models/notes-level.mjs
 npm run start-level

VII section 07

chapter 07
section 07
SQL with SQLite3

npm i sqlite3
touch models/schema-sqlite3.sql
npm run sqlite3-setup
touch models/notes-sqlite3.mjs
npm run start-sqlite3
DEBUG=notez:* npm run start-sqlite3
npm run start-sqlite3
sqlite3 chap07.sqlite3

SQL with SQLite3

select * from notes;

VII section 08

chapter 07
section 08
ORM way with Sequelize

npm i sequelize
npm i js-yaml
touch models/notes-sequelize.mjs
touch models/sequelize-sqlite.yaml

VII - section 09

chapter 07
section 09
MongoDB

 1916  wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
 1917  echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
 1919  sudo apt-get install -y mongodb-org
 1920  which mongo
 1921  mongo
 1922  echo "mongodb-org hold" | sudo dpkg --set-selections
 1923  echo "mongodb-org-server hold" | sudo dpkg --set-selections
 1924  echo "mongodb-org-shell hold" | sudo dpkg --set-selections
 1925  echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
 1926  echo "mongodb-org-tools hold" | sudo dpkg --set-selections
 1927  sudo systemctl start mongod
 1928  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
 1929  echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
 1930  sudo apt-get update
 1931  sudo apt-get install -y mongodb-org
 1932  sudo apt-get purge mongodb-org*
 1933  Remove MongoDB
 1934  mongo db
 1935  sudo apt install mongodb-clients
 1936  mongo db
 1937  sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
 1938  sudo apt-get purge mongodb-10gen
 1939  sudo apt-get autoremove
 1940  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
 1941  nano /etc/apt/sources.lists
 1942  sudo nano /etc/apt/sources.lists
 1943  nano /etc/apt/sources.lists
 1945  sudo apt-get install mongodb-10gen
 1946  sudo rm /var/lib/mongodb/mongod.lock
 1947  mongod --repair
 1948  sudo apt install mongodb-server-core
 1949  sudo service mongodb start
 1950  mongo
 1951  mongodb
 1952  mongod
 1953  sudo service mongodb start
 1954  mongo
 1955  mongod
 1956  mongod --repair
 1957  which mongod
 1960  sudo apt remove mongod
 1961  mongodb
 1962  sudo rm /var/lib/mongodb/mongod.lock
 1963  sudo apt-get purge mongodb-org*
 1964  sudo rm -r /var/log/mongodb /var/lib/mongodb
 1965  sudo apt-get purge mongod*
 1966  mongodb
 1967  which mongod
 1968  nano /etc/apt/sources.lists
 1969  sudo nano /etc/apt/sources.lists
 1970  nano /etc/apt/sources.lists
 1975  which mongo
 1976  mongo
 1977  sudo apt install mongodb-clients
 1978  mongo
 1979  mongodb
 1980  sudo apt uninstall mongodb-clients
 1981  sudo apt remove mongodb-clients
 1982  sudo apt purge mongodb-clients
 1984  mongo
 1985  which mongo
 1986  mongodb
 1987  mongod
 1988  sudo apt install mongodb-server-core
 1989  mongod
 1990  sudo apt install mongodb-clients
 1991  mongod
 1992  which mongo
 1993  mongodb
 1994  mongod
 1999  npm i mongodb
 2000  npm audit
 2002  touch models/notes-mongodb.mjs
---

## Chapter 08

---

### 8 - III

```bash section 3
section 3

8 - IV

section 4

8 - V

section 5

8 - VI

section 6

8 - VII

section 7

8 - VIII

section 8

8 - IX

section 9
  1. alt textDavid Herron:

  2. alt textAndy Harris:

  3. alt textDylan Isreal:

  4. alt textSnow:

  5. alt textStephen Meyuex:

  6. alt textBrad Traversy:

  7. alt textMaximillian Schwartz:

  8. alt textBrett Fischer:

  9. alt textInline-style:

  10. alt textInline-style:

chapter 07 section 04 es6 modules

notezfourthediton's People

Contributors

turtlewolfe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.