https://github.com/kyledetella/typescript-ncc-serverless-template
A TypeScript + ncc + Serverless starter kit
https://github.com/kyledetella/typescript-ncc-serverless-template
jest lambda ncc servrless template typescript
Last synced: 3 months ago
JSON representation
A TypeScript + ncc + Serverless starter kit
- Host: GitHub
- URL: https://github.com/kyledetella/typescript-ncc-serverless-template
- Owner: kyledetella
- Created: 2019-05-25T18:53:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:22:40.000Z (over 2 years ago)
- Last Synced: 2024-04-14T14:40:16.143Z (over 1 year ago)
- Topics: jest, lambda, ncc, servrless, template, typescript
- Language: TypeScript
- Size: 2.48 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TypeScript ncc serverless Template
Quickly bootstrap a [serverless](https://serverless.com) project.
This creates a serverless project fronted by API Gateway. For a project with _direct_ invocation, see: [typescript-ncc-serverless-template-direct](https://github.com/kyledetella/typescript-ncc-serverless-template-direct).
Features:
- TypeScript (compiled using [ncc](https://github.com/zeit/ncc))
- [Jest](https://jestjs.io/) configured out-of-the-box
- Local development via [serverless-offline](https://github.com/dherault/serverless-offline)Table of Contents
- [TypeScript ncc serverless Template](#typescript-ncc-serverless-template)
- [Usage](#usage)
- [Development](#development)
- [Install dependencies](#install-dependencies)
- [Testing locally](#testing-locally)
- [Testing](#testing)
- [Deployment](#deployment)## Usage
```sh
npx serverless create --template-url https://github.com/kyledetella/typescript-ncc-serverless-template --path && \
cd
```Inside of your new app directory, run:
```sh
nvm use && npm i
```## Development
### Install dependencies
```bash
nvm use && npm i
```### Testing locally
This project uses [serverless-offline](https://github.com/dherault/serverless-offline) to emulate API Gateway and Lambda functionality.
```sh
npm start
```The service will be available at http://localhost:4144.
```sh
curl -X POST -d '{"foo": "bar"}' http://localhost:4144
```## Testing
```sh
npm t
```To run in watch mode:
```sh
npm run test:watch
```## Deployment
```bash
npm run deploy
```