Bootstrap a serveless express API project to deploy at now.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Node
- Now CLI
- Clone
git clone https://github.com/antoniojps/now-express-template.git
cd now-express-template
- Start developing
now dev
Your functions are now running at http://localhost:3000/api/hello.js
!
To understand how to deploy read the Now CLI documentation: Node.js.
now --target production
The base configuration is at now.json
, notices now to use the version 2 of now, which is cheaper and prefered, it also instructs now to build all the files within the api folder with the @now/node
modules to be installed.
{
"version": 2,
"name": "change-this",
"builds": [{ "src": "api/**/*.js", "use": "@now/node" }],
"alias": ["change-this"]
}
- António Santos - antoniosantos.me