Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 1.58 KB

README.md

File metadata and controls

77 lines (59 loc) · 1.58 KB

TrendRepositories

This repository includes 3 apps and 2 libs. This project created by using NX build system.

Heroku URL: https://trend-repositories-client.herokuapp.com/

Apps

  • Bff
    • GraphQL
    • Apollo Server
  • Client
    • Next.js
    • Apollo Client
  • Client e2e
    • Cypress

Libs

  • api-interface
  • ui
    • styled-components

Installation

$ npm install

Development

$ npm run start # start bff and client
$ npm run start:bff
$ npm run start:client

Build

$ npm run build # build bff and
$ npm run build:bff
$ npm run build:client

Tests

$ npm run test # run all project tests with coverage
$ npm run test:ui
$ npm run test:ui:coverage
$ npm run test:client
$ npm run test:client:coverage
$ npm run test:bff
$ npm run test:bff:coverage

e2e Test

$ npm run e2e
$ npm run e2e:watch

I didn't write tests for all cases. I aimed to show you my test writing ability.

Deployment From Local

$ heroku buildpacks:add -a trend-repositories-client heroku-community/multi-procfile
$ heroku buildpacks:add -a trend-repositories-backend heroku-community/multi-procfile

$ heroku buildpacks:add -a trend-repositories-client heroku/nodejs
$ heroku buildpacks:add -a trend-repositories-backend heroku/nodejs

$ heroku config:set -a trend-repositories-client PROCFILE=Procfile.client   
$ heroku config:set -a trend-repositories-backend PROCFILE=Procfile.bff  

$ git push https://git.heroku.com/trend-repositories-client.git HEAD:master 
$ git push https://git.heroku.com/trend-repositories-backend.git HEAD:master