npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

alexa-skill-local

v1.3.0

Published

Develop Alexa skills locally

Downloads

31

Readme

Build Status

Coverage Status

alexa-skill-local

alexa-skill-local provides you local development environment for your Alexa Skill. It starts ngrok and mock lambda server on the same port. All the traffic on this port is tunneled through ngrok. You have to login with Amazon to update your skill endpoint with the ngrok url. Mock lambda server calls your lambda function the each time it gets request from Alexa.

Requirements

  • Node and npm
  • Alexa Skill (Lambda Code) written in Node.js

Installation

Use Node.js v8.x.x to run.

You can install alexa-skill-local globally (recommended) or in your project directory (in this case you many want to run it from npm scripts in package.json).

$ npm install -g alexa-skill-local

Usage

Run following command. When prompted open http://localhost:3001 in your browser. Login with Amazon to grant alexa-skill-local an access to update your skill's endpoint.

$ alexa-skill-local [-f|--file <lambda_function_entry_file>] [-p|--port <server_and_ngrok_port>] [-c|--config <json_config_file>] [--inspect-brk <port>]

--file : Optional. When run without --file argument alexa-skill-local searches for main entry in package.json. If not found, it searches for index.js in the root directory.

--port: Optional. Specify port value for mock lambda server and ngrok. Default value is 3000.

--config: Optional. If not specified, it searches for asl-config.json in the root directory. You need to have config file, otherwise skill endpoint update won't work. Config file has to be of following format (If you are not sure of the "stage", in most cases it is "development"):

{
    "skillId" : "your_skill_id_here",
    "stage" : "stage_of_the_skill"
}

--inspect-brk: Optional. Specify this flag if you want to attach debugger to mock lambda server process. If port is not specified debugger will listen to is 9229.

Then you can use your favorite editor to attach debugger to this process.
For example in VSCode you will need following configuration in your launch.json file:

{
    "type": "node",
    "request": "attach",
    "name": "alexa-skill-local",
    "processId": "${command:PickProcess}",
    "restart": true,
    "protocol": "inspector",
    "port": 9229
}

License

MIT

Contact

email : [email protected]

Links

npm : https://www.npmjs.com/package/alexa-skill-local
Privacy Policy : https://sites.google.com/view/alexa-skill-local