Skip to content

Latest commit

 

History

History
142 lines (121 loc) · 3.28 KB

File metadata and controls

142 lines (121 loc) · 3.28 KB
/ NodeJS Sequelize with JWT Auth    \
|                                   |
| versi 1.0.0                       |
|                                   |
| GENERATOR CRUD by @yogithesymbian |
|                                   |
\ TIP :                             /
-----------------------------------

  \
   \
       .--.
      |o_o |
      |:_/ |
     //   \ \
    (|     | )
/'\__/`\
   \___)=(___/


1) -----------------------
2) generate migration, model, controller & router
3) generate seeder
4) -----------------------
5) migrate fresh seed
6) import view.sql
7) npx sequelize-cli db:migrate
8) npx sequelize-cli db:seed:all
9) DROP DATABASE
10) --------SERVER---------
11) RESTART SERVICE NODEJS
12) JOURNAL SERVICE NODEJS
13) show http listen
14) Quit
Please enter your choice: 2


Processing Generate model ...
                 deliver to (./src/db/models/)

Processing Generate migration ...
                 deliver to (./src/db/migrations/)

example   :   book
Please enter your model_name: book

________________________________________

/ (1) now ... if you have relation lets  \
| type and enter.                        |
|                                        |
| for next relation just type and enter  |
| again                                  |
|                                        |
| TIP : relations is equal to associate, |
\ CTRL + D for next command              /
----------------------------------------

  \
   \
       .--.
      |o_o |
      |:_/ |
     //   \ \
    (|     | )
/'\__/`\
   \___)=(___/

input relations model_name : user
input relations model_name : ^D
________________________________________

/ (2) now ... you need to define column  \
| table                                  |
|                                        |
| in this version, we only define string |
| type of these output code              |
|                                        |
| search #TODO to see any code for       |
| enhancement.                           |
|                                        |
| TIP : we have present snippet on       |
\ .vscode for column with any type       /
----------------------------------------

  \
   \
       .--.
      |o_o |
      |:_/ |
     //   \ \
    (|     | )
/'\__/`\
   \___)=(___/

input column of model_name : name
input column of model_name : penerbit
input column of model_name : ^D
---------------------------------------------

CRUD ALREADY CREATED
// SHOW ALL -> GET    : /api/book
// FIND ONE -> GET    : /api/book/:id
// CREATE   -> POST   : /api/book
// UPDATE   -> PUT    : /api/book/:id
// DELETE   -> DELETE : /api/book/:id/:flag

* SELAMAT, GRATS & AWESOME *

_____

( asd )
-----

    o
     o
            ,;;;;;;;,
           ;;;;;;;;;;;,
          ;;;;;'_____;'
          ;;;(/))))|((\
          _;;((((((|))))
         / |_\\\\\\\\\\\\
    .--~(  \ ~))))))))))))
   /     \  `\-(((((((((((\\
   |    | `\   ) |\       /|)
    |    |  `. _/  \_____/ |
     |    , `\~            /
      |    \  \           /
     | `.   `\|          /
     |   ~-   `\        /
      \____~._/~ -_,   (\
       |-----|\   \    ';;
      |      | :;;;'     \
     |  /    |            |
     |       |            |

---------------------------
PID : ''
you are awesome (r) for recall (any) for exit :