Skip to content

taller2-grupo5-rostov-1c2022/NodeServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline codecov

Node Server

Set Up

Node 16

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ nvm install 16
Just Node

Download and run the installer from nodejs.org

Dependencies

npm i

Running the server

  • Development: npm run dev
  • Production: npm start
  • Production Container: npm run docker:compose

Default port : 8080

Documentation

Documentation will be generated at {app}/api-docs

Workflow - CI/CD

  • Cancel Redundant Deploys
  • Setup ( Checkout Repo , Install Node & Dependencies )
  • Run Linter
  • Run Tests
  • Upload Test Coverage
  • Deploy to heroku

Upload Coverage to Codecov

The pipeline automatically generates a coverage report and uploads it to codecov

You'll need to set the following actions secrets:

  • CODECOV_TOKEN: Repo Token

    Can be obtained on codecov when setting up or on settings

Deploy to Heroku

The pipeline deploys the server automatically on pushing to master

You should create the app on heroku first

You'll need to set the following actions secrets:

  • HEROKU_NAME: App name
  • HEROKU_EMAIL: Account email
  • HEROKU_API_KEY: Account API key
  • API_KEY: This app's api-key, needed to make requests
Generating API Key
$ heroku login
$ heroku authorizations:create

use token from created auth

Deploy

Resources