Deploying Static Apps

now comes with a native support for static deployments. It considers all projects that don't have a Dockerfile, nor a package.json as a static deployment.
Deploying such a static project is still as easy as running a single command:
now

Under the Hood

The technology behind our servers is a Node.js module called serve, which you can download, fork, extend and even operate locally during development.
What does this mean for your team and your business? Great user experience with zero lock-in.
If you can’t wait for us to add a certain capability to our static deployments support, you can just create a package.json like this:
{
  "name": "extensible",
  "scripts": {
    "start": "serve ."
  },
  "dependencies": {
    "serve": "latest"
  }
}
Then run now, and we will detect the presence of package.json and deploy it as a npm deployment.

Behavior

  • If a index.html file exists, it will be rendered
  • If only a single file was uploaded, the deployment URL will respond with it directly (you can still access it under its original path - e.g.: /image.png)
  • When uploading multiple files, a directory listing will be displayed

Deployment Inactivity

Old deployments always stay around forever if you don't remove them using now remove.
However, the new static deployments, without the package.json are never put to sleep but are always quickly accessible.