Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Program-AR/pilas-bloques-api

Repository files navigation

¡Hola! 🖖 Este es un proyecto relacionado a Pilas Bloques ❤️. En el repositorio de ese proyecto encontrarás las guías sobre cómo contribuir y el código de conducta, que son guías que aplican también a este proyecto.

Hi! 🖖 This is a project related to Pilas Bloques ❤️. In that project's repository you'll find the contribution guidelines and the code of conduct which also apply to this project.

Pilas Bloques API (ARCHIVED)

Now this project is shipped as part of https://github.com/Program-AR/pilas-bloques-backend

REST-API for Pilas Bloques app.

Requisites

  • Nodejs (v12 >=)
  • MonngoDB. This can be done by running a docker image:

Docker run example:

docker run -d --rm -p 27017:27017 -v $HOME/mongoData:/data/db --name mongoPilasBloques mongo:5.0.5

Config project

  • Checkout this repository.
  • Create .env file with the required enviroments variables. You can copy from sample.env
  • Run npm install

Running app

Remember start the DB before!

For development

  • Run npm run dev for server starts. Any file change should re-run the it.

For production

  • Run npm run build for make dist directory. (TODO)
  • Run npm start for server starts.

Running tests

All tests

  • Run npm test

Only one file

  • Run npm test -- -f <FILE_PATH>

Releasing app

  • Run npm run release:patch. This bumps to the next version, creates a tag and creates a Github Release.
  • On the window that pops choose release name, description and click Publish Release. This publishes the release and triggers the Github Action workflow that uploads the zip with the pilas-bloques-api files.

Deploying app