Skip to content

Instantly share code, notes, and snippets.

@guiliredu
Last active March 13, 2020 21:09
Show Gist options
  • Select an option

  • Save guiliredu/dd1bf1df60869fe6f62843e07f7602a2 to your computer and use it in GitHub Desktop.

Select an option

Save guiliredu/dd1bf1df60869fe6f62843e07f7602a2 to your computer and use it in GitHub Desktop.

Revisions

  1. guiliredu revised this gist Mar 13, 2020. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions _References.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,9 @@ Express
    - consign
    - Database
    - mysql
    - sqlite3
    - pg
    - mongo
    - knex
    - Cache
    - memcached
  2. guiliredu revised this gist Mar 13, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _References.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,7 @@ Express
    - consign
    - Database
    - mysql
    - knex
    - Cache
    - memcached
    - Log
  3. guiliredu revised this gist Mar 13, 2020. 1 changed file with 30 additions and 3 deletions.
    33 changes: 30 additions & 3 deletions _References.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,35 @@
    Tutoriais
    # NodeJS Reference Guide

    Tutorials
    - https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex

    Express
    - https://expressjs.com/en/starter/

    Bee-queue
    - https://github.com/bee-queue/bee-queue
    ## Packages

    - Server
    - express
    - nodemon
    - Request
    - body-parser
    - express-validator
    - Session
    - cookie-session
    - passport
    - express-session
    - uuid
    - Template
    - twing
    - marko
    - ejs
    - Cluster
    - cluster
    - Autoload files
    - consign
    - Database
    - mysql
    - Cache
    - memcached
    - Log
    - winston
  4. guiliredu revised this gist Feb 11, 2020. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions _References.md
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,8 @@
    https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex
    https://expressjs.com/en/starter/
    Tutoriais
    - https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex

    Express
    - https://expressjs.com/en/starter/

    Bee-queue
    - https://github.com/bee-queue/bee-queue
  5. guiliredu revised this gist Jan 2, 2020. 2 changed files with 48 additions and 1 deletion.
    46 changes: 46 additions & 0 deletions Express.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    # Express.js

    ## Installing

    `$ npm install express --save`

    ## Hello World

    ```js
    // index.js
    const express = require('express')
    const app = express()
    const port = 3000

    app.get('/', (req, res) => res.send('Hello World!'))

    app.listen(port, () => console.log(`Example app listening on port ${port}!`))
    ```

    Than run `$ node index.js`

    # Express generator

    https://expressjs.com/en/starter/generator.html

    Installing Express generator: `$ npm install -g express-generator`
    Creating a new project: `$ express myapp && cd myapp && npm install`

    # Routing

    https://expressjs.com/en/guide/routing.html

    ```js
    // Basic routing
    app.get('/', function (req, res) {
    res.send('Hello World!')
    })

    // Parameters
    app.get('/users/:userId/books/:bookId', function (req, res) {
    res.send(req.params)
    })
    // Route path: /users/:userId/books/:bookId
    // Request URL: http://localhost:3000/users/34/books/8989
    // req.params: { "userId": "34", "bookId": "8989" }
    ```
    3 changes: 2 additions & 1 deletion References.md → _References.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex
    https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex
    https://expressjs.com/en/starter/
  6. guiliredu created this gist Dec 16, 2019.
    1 change: 1 addition & 0 deletions References.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    https://steemit.com/graphql/@alien35/creating-a-scalable-api-using-node-graphql-mysql-and-knex