Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.57 KB

README.md

File metadata and controls

51 lines (31 loc) · 1.57 KB

create-netlify-functions

This is an initialiser for npm (like create-react-app) which scaffolds a small project for being able to deploy Netlify Functions.

Usage

Where you would substitute <directory-name> for the new directory you want the project to be created in.

This is required, if you don’t specify one, don’t worry it won’t use your current working directory by default.

npm init netlify-functions <directory-name>

or

npx create-netlify-functions <directory-name>

or

yarn create netlify-functions <directory-name>

What does it do?

Currently it creates a single “hello world” lambda in a directory. It sets up the Netlify config so that you could publish it immediately and it should Just Work™.

There will be a test suite already set up for you to add to. Run npm test in your new directory.

There will also be a dev environment set up for you via the netlify-lambda package

Local Development

git clone [email protected]:leggsimon/create-netlify-lambdas.git
cd create-netlify-lambdas
npm install

How to publish

(This is more for me, so I don’t forget)

This uses the np package to deploy. On the master branch locally run np and follow the instructions.

Why?

I’ve really enjoyed how Netlify have made creating lambda functions so easy to set up and deploy and I’d like to make it easier for others to do it I guess…