在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):hardyscc/aws-nestjs-starter开源软件地址(OpenSource Url):https://github.com/hardyscc/aws-nestjs-starter开源编程语言(OpenSource Language):TypeScript 91.8%开源软件介绍(OpenSource Introduction):Serverless, AWS, NestJS, GraphQL and DynamoDB starterDescriptionA starter project that makes creating a deployable AWS Serverless project extremely easy. TechnologiesUsagegit clone https://github.com/hardyscc/aws-nestjs-starter.git <Your_Project_Name>
cd <Your_Project_Name>
npm install After that find and replace
Setup AWS Credentials
Setup WorkstationInstall AWS CLI
Config AWS CLI $ aws configure
AWS Access Key ID [****************TKYQ]:
AWS Secret Access Key [****************yNO2]:
Default region name [None]:
Default output format [None]:
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
Stay in touch
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论