Skip to content

Commit f688ca6

Browse files
committed
Docs: add pre and poststart hook
1 parent 21d29d5 commit f688ca6

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

README.md

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -76,37 +76,6 @@ This boilerplate has 4 main directories:
7676
- db - this is only a dir for the sqlite db, the default for NODE_ENV development
7777
- test - using [AVA](https://github.com/avajs/ava)
7878

79-
```sh
80-
src
81-
├── api
82-
│ ├── controllers
83-
│ │ └── UserController.js
84-
│ ├── models
85-
│ │ └── User.js
86-
│ ├── policies
87-
│ │ └── auth.policy.js
88-
│ ├── services
89-
│ │ ├── auth.service.js
90-
│ │ └── bcrypt.service.js
91-
│ └── api.js
92-
├── config
93-
│ ├── connection.js
94-
│ ├── database.js
95-
│ ├── index.js
96-
│ └── routes
97-
│ ├── privateRoutes.js
98-
│ └── publicRoutes.js
99-
├── db
100-
│ └── database.sqlite
101-
└── test
102-
├── controllers
103-
│ └── UserController.test.js
104-
├── models
105-
│ └── User.test.js
106-
└── setup
107-
└── _setup.js
108-
```
109-
11079
## Controllers
11180

11281
### Create a Controller
@@ -240,8 +209,6 @@ const ModelController = () => {
240209
};
241210
};
242211

243-
// IMPORTANT
244-
// don't forget to export the Controller
245212
model.exports = ModelController;
246213
```
247214

@@ -444,7 +411,7 @@ For further information read the [docs](https://github.com/aichbauer/express-rou
444411

445412
Example for User Model:
446413

447-
> Note: Only supported Methods are **POST**, **GET**, **PUT**, and **DELETE**. So no **PATCH** for updates, etc...
414+
> Note: Only supported Methods are **POST**, **GET**, **PUT**, and **DELETE**.
448415
449416
userRoutes.js
450417

@@ -546,6 +513,8 @@ There are no automation tool or task runner like [grunt](https://gruntjs.com/) o
546513

547514
This is the entry for a developer. This command:
548515

516+
By default it uses a sqlite databse, if you want to migrate the sqlite db by each start, disable the `prestart` and `poststart` command. Also mind if you are using a sqlite database to delete the `drop-sqlite-db` in the prepush hook.
517+
549518
- runs **nodemon watch task** for the all files conected to `.api/api.js`
550519
- sets the **environment variable** `NODE_ENV` to `development`
551520
- opens the db connection for `development`

0 commit comments

Comments
 (0)