Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miolab/node_sample
Node.js関係いろいろ
https://github.com/miolab/node_sample
Last synced: about 2 months ago
JSON representation
Node.js関係いろいろ
- Host: GitHub
- URL: https://github.com/miolab/node_sample
- Owner: miolab
- Created: 2020-04-27T23:06:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T23:17:20.000Z (about 2 years ago)
- Last Synced: 2023-03-05T22:17:18.802Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Sample Codes
```
$ node --version
v12.16.1$ npm --version
6.14.4$ mongo --version
MongoDB shell version v4.2.5
```---
### sample_server_ejs/
```
$ npm install ejs
```#### usage
`$ node app.js`
---
### sample_mongo/
- use MongoClient
```
$ npm install mongodb
```#### usage
`$ node app.js`
---
### expressjs/
- `sample/` **(express-generator)**
```
$ npm install
$ npm install express
$ npm install express-generator -g
```- Express version : "4.17.1"
#### usage
```
$ express sample
$ cd sample
$ npm install
$ DEBUG=sample:\* npm start
```- [http://localhost:3000](http://localhost:3000)
- `myapp/` **(express-generator)**
```
$ npm install morgan nodemon ejs body-parser
```npm audit fix
npx nodemon app
---
### blog/
```
$ npm install express ejs nodemon morgan body-parser method-override// CSRF
$ npm install cookie-parser express-session csurf
```#### usage
```
$ npx nodemon app
```