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 install
Create the .env
file with the required environment variables from the .env.example
file by running:
cp .env.example .env
Remember to replace the dummy values with real values for each variable.
Run the development environment using Docker Compose:
yarn docker:dev
or:
docker-compose --profile dev up
The app will be accessible at http://localhost:3000.
When installing new dependencies, the app needs to be restarted by running:
yarn docker:dev
or:
docker-compose --profile dev up --build -V
With 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:prod
or:
docker-compose --profile prod up
The app will be accessible at http://localhost:3001.
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
Each 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.json
with the new release version. We follow the Semantic Versioning standard for defining each version of the app.1.2. Update the
CHANGELOG.md
file with the additions and changes of the release. -
Tag and push the new release (use the prefix
v
before 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.