Backend application template
The first thing you should do after initializing a new backend project with this repository is to modify the package.json
to meet your project needs.
Specifically, ensure that:
name
is set to@voiceflow/YOUR_PKG_NAME
- All Github URLs referencing
backend-template
should be modified to point to your project's repository URL
The default CI template is sufficient to get you started with automated tests:
- Modify the
.circleci/config.yml
file with the proper package name for thenpm-repo
(this should correspond to yourname
inpackage.json
). - Inspect the
jobs.test
stanza of the CircleCI config to modify database setup and additional steps for tests. Don't forget to commit your changes - Click "Set up project" in the CircleCI Projects view.
- Select "Use existing config" and click "start building". At this point, your project should be set up to automatically run tests on pushes. Please speak to Frank Gu if you wish to set up the component for dev environments and deployment.
In order to run this package locally, make sure you have yarn
and brew
installed.
You also need to acquire a .env
file and a local_sercrets.yaml
file from engineering to load development secrets.
This Repository Relies on yarn
and does not work with npm
. This package is currently set to release on master
and will not publish to NPM.
If you wish to change this behavior, refer to .releaserc
.
Use yarn
to install this project's dependencies.
yarn install
Use mkcert
to generate and install SSL certificates for local development.
yarn gen-certs
Run tsc
to generate a compiled version of the server.
yarn build
Run the express
server locally.
yarn local
Test the code for linting errors with estlint
.
yarn lint
Run unit tests with mocha
.
yarn test:run