This is frontend application. You need working backend application for it. You may get it here https://github.com/metastudio/cashbox
$ yarn install
Copy .env.sample
to .env.local
and edit this file.
$ yarn start
TSLint is used to lint both JavaScript and TypesScript files. Linting is run when you start development server or build bundle.
To use TSLint for JavasSrript files set config tslint.jsEnable
to true
.
Add next task to be able to run lint as task in VSCode:
{
"version": "2.0.0",
"tasks": [
{
"label": "Lint",
"type": "npm",
"script": "lint",
"problemMatcher": {
"base": "$tslint5",
"fileLocation": "relative"
}
}
]
}
Heroku is used for deployment. rscashbox
- is application for staging
and rcashbox
- for production.
-
Install heroku-cli
-
Login to heroku:
$ heroku login
Use master
branch to deploy to staging:
- Add configured heroku application:
$ heroku git:remote -a rscashbox -r heroku-staging
- Make sure that environment variables are set:
Output should looks something like this:
$ heroku config -r heroku-staging
Set a new env variable if required (see=== rscashbox Config Vars REACT_APP_BACKEND_HOSTNAME: staging.cashbox.metastudiohq.com REACT_APP_BACKEND_PORT: 443 REACT_APP_BACKEND_PROTOCOL: https
.env.sample
for list of used variables):$ heroku config:set -r heroku-staging VARIABLE=value
- Deploy:
$ git push heroku-staging master
Use production
branch to deploy to production.
- Add configured heroku application:
$ heroku git:remote -a rcashbox -r heroku-production
- Make sure that environment variables are set:
Output should looks something like this:
$ heroku config -r heroku-production
Set a new env variable if required (see=== rcashbox Config Vars NODE_ENV: production REACT_APP_BACKEND_HOSTNAME: cashbox.metastudiohq.com REACT_APP_BACKEND_PORT: 443 REACT_APP_BACKEND_PROTOCOL: https
.env.sample
for list of used variables):$ heroku config:set -r heroku-production VARIABLE=value
- Deploy:
$ git push heroku-production production:master