Skip to content

Commit d143127

Browse files
authored
Improve readme (#4)
* Bump minor and set private attribute to true * Improve informations on readme
1 parent 0416b3d commit d143127

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Node API boilerplate
22

3-
It's an opinionated boilerplate for Node web APIs focused on separation of concerns and scalability.
3+
An opinionated boilerplate for Node web APIs focused on separation of concerns and scalability.
44

55
## Features
66

77
<dl>
88
<dt>Multilayer folder structure</dt>
99
<dd>
10-
Code organization inspired by <a href="http://dddcommunity.org/">DDD</a> and <a href="https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html">Clean Architecture</a>
10+
<a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/Folder-structure">Code organization</a> inspired by <a href="http://dddcommunity.org/">DDD</a> and <a href="https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html">Clean Architecture</a> focused on codebase scalability.
1111
</dd>
1212

13-
<dt>Instant feedback</dt>
13+
<dt>Instant feedback and reload</dt>
1414
<dd>
1515
Use <a href="https://www.npmjs.com/package/nodemon">Nodemon</a> to automatically reload the server after a file change when on development mode, makes the development faster and easier.
1616
</dd>
1717

1818
<dt>Ready for production</dt>
1919
<dd>
20-
Setup with <a href="https://www.npmjs.com/package/pm2">PM2</a> process manager ready to go live on production. If you use Heroku there's also a Procfile and a post-build task to run the migrations on production.
20+
Setup with <a href="https://www.npmjs.com/package/pm2">PM2</a> process manager ready to go live on production. It's also out-of-box ready to be deployed at Heroku, you can read more about it <a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/Setup-in-Heroku">here</a>.
2121
</dd>
2222

2323
<dt>Scalable and easy to use web server</dt>
@@ -27,17 +27,17 @@ It's an opinionated boilerplate for Node web APIs focused on separation of conce
2727

2828
<dt>Database integration</dt>
2929
<dd>
30-
<a href="https://www.npmjs.com/package/sequelize">Sequelize</a>, an ORM for SQL databases, is already integrated, you just have to set the authentication configurations.
30+
<a href="https://www.npmjs.com/package/sequelize">Sequelize</a>, an ORM for SQL databases, is already integrated, you just have to set the <a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/Database-setup">authentication configurations</a>.
3131
</dd>
3232

3333
<dt>Prepared for testing</dt>
3434
<dd>
35-
The test suite uses <a href="https://www.npmjs.com/package/mocha">Mocha</a>/<a href="https://www.npmjs.com/package/chai">Chai</a> and is prepared to run unit, integration and functional tests right from the beginning. There are helpers to make it easy to make requests to the web app during the tests and for cleaning the database after each test. A <a href="https://www.npmjs.com/package/factory-girl">FactoryGirl</a> adapter for Sequelize is setup as well to make your tests DRY, and the tests generate code coverage measurement with <a href="https://www.npmjs.com/package/istanbul">Istanbul</a>.
35+
The test suite uses <a href="https://www.npmjs.com/package/mocha">Mocha</a>/<a href="https://www.npmjs.com/package/chai">Chai</a> and is prepared to run unit, integration and functional tests right from the beginning. There are helpers to <a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/The-test-suite">make it easy to make requests to the web app during the tests and for cleaning the database after each test</a>. A <a href="https://www.npmjs.com/package/factory-girl">FactoryGirl</a> adapter for Sequelize is setup to make your tests DRY as well, and the tests generate code coverage measurement with <a href="https://www.npmjs.com/package/istanbul">Istanbul</a>. You should read about the <a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/Chai-plugins">Chai plugins that are setup by default too</a>.
3636
</dd>
3737

3838
<dt>Dependency injection</dt>
3939
<dd>
40-
With <a href="https://www.npmjs.com/package/awilix">Awilix</a>, a practical dependency injection library, the code will not be coupled and it'll still be easy to resolve automatically the dependencies on the runtime and mock them during the tests. It's even possible inject dependencies on your controllers with the <a href="https://www.npmjs.com/package/awilix-express">Awilix Express adapter</a>.
40+
With <a href="https://www.npmjs.com/package/awilix">Awilix</a>, a practical dependency injection library, the code will not be coupled and it'll still be easy to resolve automatically the dependencies on the runtime and mock them during the tests. It's even possible inject dependencies on your controllers with the <a href="https://www.npmjs.com/package/awilix-express">Awilix Express adapter</a>. Click <a href="https://github.com/talyssonoc/node-api-boilerplate/wiki/Dependency-injection-container">here</a> if you want to read more about how to use dependency injection with this boilerplate.
4141
</dd>
4242

4343
<dt>CLI integration</dt>
@@ -62,31 +62,31 @@ _Notice that the boilerplate comes with a small application for user management
6262

6363
1. Clone the repository with `git clone --depth=1 https://github.com/talyssonoc/node-api-boilerplate`
6464
2. Setup the database on `config/database.js` (there's an example file there to be used with PostgreSQL 😉 )
65-
3. Install the dependencies with `yarn` (click here if you [don't have Yarn installed](https://yarnpkg.com/docs/install))
65+
3. Install the dependencies with `yarn` (click here if [you don't have Yarn installed](https://yarnpkg.com/docs/install))
6666
4. Create the development and test databases you have setup on `config/database.js`
6767
5. Run the database migrations with `npm run sequelize db:migrate`
6868
6. Add some seed data to the development database with `npm run sequelize db:seed:all`
6969
7. Run the application in development mode with `npm run dev`
7070
8. Access `http://localhost:3000/api/users` and you're ready to go!
7171

72-
After playing a little bit with the boilerplate and before implementing a real application with it I recommend you to read at least the `Setup` and the `Organization and architecture` sections of our [Wiki](https://github.com/talyssonoc/node-api-boilerplate/wiki). After that you'll be able to remove the example application files running `npm run cleanup`
72+
After playing a little bit with the boilerplate and _before_ implementing a real application with it I recommend you to read at least the `Setup` and the `Organization and architecture` sections of our [Wiki](https://github.com/talyssonoc/node-api-boilerplate/wiki). After that you'll be able to remove the example application files running `npm run cleanup`
7373

7474
## Aditional info:
7575

7676
- Don't forget to run the migrations for the test environment as well (including when you create a new migration) with `npm run sequelize db:migrate -- --env=test`
7777

7878
## Scripts
7979

80-
This boilerplate comes with a collection of npm scripts to make your life easier, you'll run them with `npm run <script name>`:
80+
This boilerplate comes with a collection of npm scripts to make your life easier, you'll run them with `npm run <script name>` or `yarn run <script name>`:
8181

82-
- `dev`: Open the application in development mode
83-
- `start` Open the application ready to production (prefer not to do that in development)
82+
- `dev`: Run the application in development mode
83+
- `start` Run the application in production mode (prefer not to do that in development)
8484
- `test`: Run the test suite
8585
- `coverage`: Run the test suite and generate code coverage, the output will be on `coverage` folder
86-
- `lint`: Run the linter
87-
- `sequelize`: Alias to use the [Sequelize CLI](https://github.com/sequelize/cli)
88-
- `console`: Open a pre-built console, you can access the DI container through the `container` variable once it's open, the console is promise-friendly
89-
- `cleanup`: Removes the files from example application
86+
- `lint`: Lint the codebase
87+
- `sequelize`: Alias to the [Sequelize CLI](https://github.com/sequelize/cli)
88+
- `console`: Open the built-in console, you can access the DI container through the `container` variable once it's open, the console is promise-friendly. Click [here](https://github.com/talyssonoc/node-api-boilerplate/wiki/Application-console) to know more about the built-in console
89+
- `cleanup`: Removes the files from the example application
9090

9191
## Tech
9292

@@ -107,6 +107,6 @@ This boilerplate comes with a collection of npm scripts to make your life easier
107107
- [Istanbul](https://www.npmjs.com/package/istanbul)
108108
- [ESLint](https://www.npmjs.com/package/eslint)
109109

110-
## Disclaimer and contributing
110+
## Contributing
111111

112-
It's the first version of the documentation of this boilerplate, feel free to contribute to it.
112+
This boilerplate is open to suggestions and contributions, documentation contributions are also important! :)

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "node-api-boilerplate",
3-
"version": "1.0.0",
3+
"version": "1.1.1",
44
"description": "A boilerplate for web APIs using Node",
55
"main": "index.js",
6+
"private": true,
67
"engines": {
78
"node": ">=6.0.0"
89
},

0 commit comments

Comments
 (0)