Node.js Boilerplate Application
Node.js boilerplate application based on Koa framework. Useful to start a new project with a complete infrastructure set.
It comes with pre-defined architecture to set new routes with validation on both request and responses in a way similar to Hapi.
The application is ready to use several Continuous Integration solutions like Travis, Wercker and even Bitbucket Pipelines.
The libraries and tools used include: * Koa; * Koa Router for routing; * Joi for schema validations; * Jest for unit tests; * Nodemon; * NSP and Snyk for security analysis; * ESLint for linting; * Swagger for interactive documentation; * Wiremock for API mock; * Travis CI; * Circle CI; * Bitbucket Pipelines; * Wercker.
- Yarn for package management;
- NVM (Node Version Manager) for managing Node.js versions;
- Node.js >= v7.7.3;
- Docker Compose.
This project comes with a combination of unit tests, code analysis tools and a API mock already set.
They are all integrated in Travis CI execution pipeline.
package.json scripts section for more details.
The project comes with WireMock already set to easy mock external API calls. It also comes with a small Node.js application that automatic restarts WireMock every time a mapping or response json is changed.
Continuous Integration and Delivery
Though more than one CI solution are being used in this project, Travis CI is the main and the one which Continuous Delivery is setup.
All tests and local code analysis tools are integrated in Travis pipeline.
After successfully pass all tests and code analysis, the application is deployed to Heroku and Docker Hub using Docker.
Copyright 2017 Vitor Hugo Salgado Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.