Skip to content

App boilerplate to start building a scalable monolithic service.

Notifications You must be signed in to change notification settings

clemente-xyz/server-app-boilerplate

Repository files navigation

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Scalable app boilerplate to start building a monolithic server from.

Prerequisites

  • Node.js (v14 or later)
  • Docker
  • Docker Compose (v1.29.0 or later)

Installation

  1. Clone the repository on your machine:
git clone https://github.com/FixerHQ/service.git
  1. Change to the project directory:
cd service
  1. Install the dependencies:
yarn install

Setup

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.

Running the app

Development

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).

Production

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.

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Managing releases

Each new release of major, minor or patches versions of Fixer follow a release procedure summarized as follows:

  1. 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.

  2. 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.

  3. Create the release on Github repository and specify the title and content. Follow Github's Managing releases docs for guidance on this.

  4. Proceed to deploy on our cloud providers.

Stay in touch

License

This repo is MIT licensed.

About

App boilerplate to start building a scalable monolithic service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published