Skip to content

matheuspiment/postfy

Repository files navigation

Postfy

An awesome post API.

travis build codecov coverage GitHub release (latest SemVer) semantic-release Commitizen friendly

Running the app

  1. Download this repository.
  2. In a terminal, enter the repository folder.
  3. Follow the steps according to the option you want:

Development server

With node

  1. Create a .env file with the content of the .env.example.
  2. Run the command npm install to install the dependencies.
  3. A mongo database is required. You can run the docker-compose up -d command to setup a mongo database. Feel free to edit the docker-compose.yml file.
  4. Run the command npm run dev.
  5. Make requests to http://localhost:<port>, where <port> is the port set in the .env file.

Production server

With node

  1. Create a .env file with the content of the .env.example.
  2. Run the command npm install to install the dependencies.
  3. Run the command npm run build.
  4. A mongo database is required. You can run the docker-compose up -d command to setup a mongo database. Feel free to edit the docker-compose.yml file.
  5. Run the command npm run start.
  6. Make requests to http://localhost:<port>, where <port> is the port set in the .env file.

Done! 😎

Running tests

  1. Create a .env.test file with the content of the .env.example.
  2. Run the command npm install to install the dependencies.
  3. A mongo database is required. You can run the docker-compose up -d command to setup a mongo database. Feel free to edit the docker-compose.yml file.
  4. Run the command npm run test.

API endpoints

See docs/endpoints.md.