All Projects → hardyscc → aws-nestjs-starter

hardyscc / aws-nestjs-starter

Licence: Unlicense license
Serverless, AWS, NestJS, GraphQL and DynamoDB starter

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to aws-nestjs-starter

Nest User Auth
A starter build for a back end which implements managing users with MongoDB, Mongoose, NestJS, Passport-JWT, and GraphQL.
Stars: ✭ 145 (-27.5%)
Mutual labels:  jest, nest, apollo-server, nestjs
nestjs-dynamoose
Dynamoose module for Nest
Stars: ✭ 84 (-58%)
Mutual labels:  dynamodb, nest, dynamoose, nestjs
Firstsight
前后端分离,服务端渲染的个人博客,基于 Nodejs、 Vue、 Nuxt、Nestjs、PostgreSQL、Apollo
Stars: ✭ 19 (-90.5%)
Mutual labels:  nest, nestjs, type-graphql
nestjs-prisma-starter
Starter template for NestJS 😻 includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker
Stars: ✭ 1,107 (+453.5%)
Mutual labels:  nestjs, type-graphql, nestjs-graphql
typegraphql-nestjs
TypeGraphQL integration with NestJS
Stars: ✭ 117 (-41.5%)
Mutual labels:  nest, nestjs, type-graphql
nestjs-extensions
[WIP] A bunch of useful and opinionated filters, modules, pipes... to use with Nest framework. 😻
Stars: ✭ 43 (-78.5%)
Mutual labels:  nest, nestjs
azure-func-http
Azure Functions HTTP adapter for Nest framework (node.js) 🌥
Stars: ✭ 121 (-39.5%)
Mutual labels:  nest, nestjs
aws-tutorial-code
AWS tutorial code.
Stars: ✭ 114 (-43%)
Mutual labels:  lambda, dynamodb
basic-serverless-api
A basic full stack example of building an API with AWS Amplify, Amazon API Gateway, AWS Lambda, and Amazon DynamoDB
Stars: ✭ 45 (-77.5%)
Mutual labels:  lambda, dynamodb
Hands-On-Serverless-Applications-with-Go
Hands-On Serverless Applications with Go, published by Packt.
Stars: ✭ 92 (-54%)
Mutual labels:  lambda, dynamodb
jest-dynalite
Jest preset to run Dynalite (DynamoDB local) per test runner
Stars: ✭ 125 (-37.5%)
Mutual labels:  dynamodb, jest-dynamodb
ng-nest-cnode
Angular 10 Front-End and Nestjs 7 framework Back-End build Fullstack CNode
Stars: ✭ 17 (-91.5%)
Mutual labels:  jest, nestjs
unnue-nuxt
开媛笔记,基于nuxt ssr首屏服务器端渲染 ⚡。用于分享、记录、交流和学习,希望可以帮助到小伙伴们。同时网站在永久更新,备好鸡血,一起来战 Ooh aah!
Stars: ✭ 98 (-51%)
Mutual labels:  nest, nestjs
nest-xray
Distributed tracing for Nestjs with AWS X-Ray as the backend. Instrument incoming and outgoing HTTP requests
Stars: ✭ 50 (-75%)
Mutual labels:  nest, nestjs
azure-serverless-deprecated
[Deprecated] Azure Serverless module for Nest framework (node.js) 🌩
Stars: ✭ 44 (-78%)
Mutual labels:  nest, nestjs
nestjs-otel
OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
Stars: ✭ 273 (+36.5%)
Mutual labels:  nest, nestjs
gozeit
GoZeit
Stars: ✭ 19 (-90.5%)
Mutual labels:  lambda, dynamodb
prisma-nestjs-graphql
Generate object types, inputs, args, etc. from prisma schema file for usage with @nestjs/graphql module
Stars: ✭ 276 (+38%)
Mutual labels:  nestjs, nestjs-graphql
nestjs-rest-cqrs-example
Example for Nest.js, MySQL, Redis, REST api, CQRS, DDD
Stars: ✭ 263 (+31.5%)
Mutual labels:  nest, nestjs
nest-rest-mongo-boilerplate
🍱 backend with nest (typescript), mongoose, and authentication
Stars: ✭ 180 (-10%)
Mutual labels:  nest, nestjs

Serverless, AWS, NestJS, GraphQL and DynamoDB starter

CI Alert Status Coverage Bugs Code Smells License

Description

A starter project that makes creating a deployable AWS Serverless project extremely easy.

Technologies

Usage

git clone https://github.com/hardyscc/aws-nestjs-starter.git <Your_Project_Name>
cd <Your_Project_Name>

npm install

After that find and replace aws-nestjs-starter to your project name on the following files:

  • package.json
  • serverless.yml
  • .env

Setup AWS Credentials

  1. Sign up for an AWS account

  2. Login to your AWS account and go to the Identity & Access Management (IAM) page.

  3. Click on Users and then Add user. Enter a name in the first field to remind you this User is related to the Serverless Framework, like serverless-admin. Enable Programmatic access by clicking the checkbox. Click Next to go through to the Permissions page. Click on Attach existing policies directly. Search for and select AdministratorAccess then click Next: Review. Check to make sure everything looks good and click Create user.

  4. View and copy the API Key & Secret to a temporary place. You'll need it in the next step.

Setup Workstation

Install AWS CLI

  • Windows: choco install awscli
  • MacOS: brew install awscli

Config AWS CLI

$ aws configure

AWS Access Key ID [****************TKYQ]:
AWS Secret Access Key [****************yNO2]:
Default region name [None]:
Default output format [None]:

Please enter your AWS Access Key ID and AWS Secret Access Key

Deployment

# deploy to AWS
$ npm run deploy

Local Offline Development

# install dynamodb local
$ npm run ddb:install

# start serverless-offline server
$ npm run sls:start

# start serverless-offline server and connect to online dynamodb
$ npm run sls:online

Local NestJS Development - (Optional)

# install dynamodb local
$ npm run ddb:install

# start dynamodb local
$ npm run ddb:start

# start local nestjs server
$ npm start

# start local nestjs server in watch mode
$ npm run start:watch

# start local nestjs server and connect to online dynamodb
$ npm run start:online

Tools

# re-generate the resources/dynamodb.yml from schemas
$ npm run genres

Unit Testing

# run unit test
$ npm test

# run unit test with coverage
$ npm run test:cov

E2E Testing

# start dynamodb local
$ npm run ddb:start

# run unit test with coverage
$ npm run test:e2e

GraphQL Endpoint Test

mutation {
  createNotification(
    input: { targetId: "device1", userId: "user1", content: "Hello World" }
  ) {
    id
  }
}
query {
  notificationByUserId(userId: "user1") {
    id
    targetId
    userId
    content
    createAt
  }
}
query {
  notificationByTargetId(targetId: "device1") {
    id
    targetId
    userId
    content
    createAt
  }
}
mutation {
  updateNotification(
    id: "1ca7726e-0af8-4ff1-8ef1-4eae97377162"
    input: { status: Deleted }
  ) {
    id
    targetId
    userId
    content
    createAt
  }
}

RESTful Endpoint Test

Please remove /dev from path if test using local nestjs mode

curl -X POST 'http://localhost:3000/dev/notification' \
  -H 'Content-Type: application/json' \
  --data-raw '{ "targetId": "device1", "userId": "user1", "content": "Hello" }'
curl -X GET 'http://localhost:3000/dev/notification?targetId=device1'
curl -X GET 'http://localhost:3000/dev/notification?userId=user1'
curl -X PATCH 'http://localhost:3000/dev/notification/a30f7101-2434-4443-87fa-493c9d9d3358' \
  -H 'Content-Type: application/json' \
  --data-raw '{ "status": "Deleted" }'

Stay in touch

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].