Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d733da6
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# NPM dependencies | ||
|
||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# AWS Lambda in TypeScript | ||
|
||
## Install the dependencies | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Run project | ||
|
||
1. Open a console | ||
|
||
```bash | ||
npm ngrok | ||
``` | ||
|
||
Copy the https link go to Alexa Console, under Endpoint section, select `HTTPS` and paste the link in `Default Region` input field. From the below dropdown choose `My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority`. | ||
Every time when you run the ngrok, you need to update the endpoint url. [1](https://medium.com/@cnadeau_/allow-alexa-to-run-your-locally-hosted-skill-1786e3ca7a1b) | ||
|
||
2. Open another console | ||
```bash | ||
npm start | ||
``` | ||
|
||
## Developer tasks | ||
|
||
Frequently used `npm script`s: | ||
|
||
| Script name | Description | | ||
|---------------|---------------------------------------------------------------------------------------------------------------------| | ||
| `start` | Runs the service locally, so you can call your API endpoints on http://localhost. | | ||
| `ngrok` | Runs the ngrok service locally, so you can use the https endpoint in Alexa skill: https://XXXXX.ngrok.io. | | ||
|
||
| | ||
|
||
|
||
## Resources | ||
|
||
1. https://medium.com/@cnadeau_/allow-alexa-to-run-your-locally-hosted-skill-1786e3ca7a1b | ||
2. https://github.com/balassy/aws-lambda-typescript | ||
3. https://ask-sdk-for-nodejs.readthedocs.io/en/latest/Developing-Your-First-Skill.html | ||
4. https://ngrok.com/ | ||
5. https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "ts-node ./src/index.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "alexa-skill-starter-pack-typescript", | ||
"version": "1.0.0", | ||
"description": "A sample to create AWS Lambda functions in TypeScript with Serverless.", | ||
"main": "src/index.ts", | ||
"scripts": { | ||
"start": "nodemon", | ||
"ngrok": "./scripts/ngrok http -bind-tls=true -host-header=rewrite 3000", | ||
"clean": "rimraf .build" | ||
}, | ||
"keywords": [ | ||
"aws", | ||
"lambda", | ||
"tslint", | ||
"typescript" | ||
], | ||
"author": "Bogdan Alexandru Militaru", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/boobo94/alexa-skill-starter-pack-typescript.git" | ||
}, | ||
"devDependencies": { | ||
"@types/aws-lambda": "^8.10.0", | ||
"@types/body-parser": "^1.17.0", | ||
"@types/express": "^4.16.0", | ||
"@types/node": "^10.0.7", | ||
"@types/request": "^2.0.8", | ||
"@types/request-promise-native": "^1.0.10", | ||
"aws-lambda-mock-context": "^3.1.1", | ||
"aws-sdk": "^2.149.0", | ||
"body-parser": "^1.18.3", | ||
"express": "^4.16.3", | ||
"nodemon": "^1.17.5", | ||
"rimraf": "^2.6.2", | ||
"source-map-support": "^0.5.0", | ||
"ts-node": "^7.0.0", | ||
"tslint": "^5.8.0", | ||
"typescript": "^2.9.2" | ||
}, | ||
"dependencies": { | ||
"ask-sdk": "^2.0.7", | ||
"ask-sdk-core": "^2.0.7", | ||
"ask-sdk-model": "^1.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", | ||
"lib": [ | ||
"es6" | ||
], | ||
"moduleResolution": "node", | ||
"rootDir": "./", | ||
"sourceMap": true, | ||
"allowJs": true, | ||
// "noImplicitAny": true, | ||
"noUnusedLocals": true, | ||
"noImplicitThis": true, | ||
"strictNullChecks": true, | ||
"noImplicitReturns": true, | ||
"preserveConstEnums": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"coverage" | ||
] | ||
} |