Scalable app boilerplate to start building a monolithic server from.
- Node.js (v14 or later)
- Docker
- Docker Compose (v1.29.0 or later)
- Clone the repository on your machine:
git clone https://github.com/FixerHQ/service.git- Change to the project directory:
cd service- Install the dependencies:
yarn installCreate the .env file with the required environment variables from the .env.example file by running:
cp .env.example .envRemember to replace the dummy values with real values for each variable.
Run the development environment using Docker Compose:
yarn docker:devor:
docker-compose --profile dev upThe app will be accessible at http://localhost:3000.
When installing new dependencies, the app needs to be restarted by running:
yarn docker:devor:
docker-compose --profile dev up --build -VWith this, all the new added deps are included in the build of the new image of the app (we ensure yarn install is being run).
Run the production environment using Docker Compose:
yarn docker:prodor:
docker-compose --profile prod upThe app will be accessible at http://localhost:3001.
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:covEach new release of major, minor or patches versions of Fixer follow a release procedure summarized as follows:
-
Update repository docs with the new release details:
1.1. Update the
package.jsonwith the new release version. We follow the Semantic Versioning standard for defining each version of the app.1.2. Update the
CHANGELOG.mdfile with the additions and changes of the release. -
Tag and push the new release (use the prefix
vbefore the version number):git tag v[major.minor.patch] git push origin v[major.minor.patch]
An example for
v[major.minor.patch]could be:v1.0.2. -
Create the release on Github repository and specify the title and content. Follow Github's Managing releases docs for guidance on this.
-
Proceed to deploy on our cloud providers.
- Author - Clemente Serrano
This repo is MIT licensed.