Skip to content

jackcohen5/be-template

Repository files navigation

BE Template Service

Build Status

This template service gives you the latest in modern JavaScript (Typescript, testing with Jest, linting with ESLint, and formatting with Prettier), the ease and power of Serverless, and bootstrapped AWS (DynamoDB, S3 and SQS) infrastructure.

Once installed, you can create and deploy functions with the latest ES6 features in minutes, with linting and formatting baked in.

Install

# Install dependencies
yarn install

Running locally

# Start local API gateway
yarn start

Test your functions with Jest

Jest is installed as the testrunner. To create a test, co-locate your test with the file it's testing as <filename>.test.js and then run/watch tests with:

yarn test

Deploy

Assuming you've already set up your default AWS credentials:

yarn deploy

yarn deploy will deploy to the development environment. You can deploy to staging or production with:

yarn deploy:staging

# -- or --

yarn deploy:production

After you've deployed, the output of the deploy script will give you the API endpoint for your deployed function(s), so you should be able to test the deployed API via that URL.

Cleaning Up

Assuming you're finished with your environment, you can delete the stack with:

yarn cleanup

yarn cleanup will remove the development environment.


NOTE

You will need to create a .env file or the above command will fail. When you are ready to use this template, follow the steps in the ejection documentation.


About

Barebones Serverless Template Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published