Name: now-serve
Owner: ZEIT
Description: Single-command static hosting
Created: 2016-04-25 20:59:08.0
Updated: 2018-05-24 01:51:28.0
Pushed: 2017-03-29 07:38:59.0
Homepage: https://zeit.co/blog/now-static
Size: 56
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project is now deprecated! Please read this instead. :blush:
This packages makes it very easy to share directories using now!
When running the ns
command, a temporary directory gets created. Within that directory, now-serve will insert a brand new package.json
that conforms to now's requirements and therefore contains a start script that runs a new instance of list when being executed on our servers.
All of this happens completely automatically. So after running the command, the only thing you need to do is wait a few seconds until your files have been deployed and share the link! :boom:
Install it (needs at least node v6)
m install now-serve -g
Run it
<file | dir> [options]
You can find a list of all options below.
| Usage | Description |
| —————————— | ———– |
| -h, –help | Output all available options |
| -V, –version | The version tag of the now-serve instance on your device |
| ‑c, ‑‑cmd [command] | The command that should be run when starting |
| -n, –name [name] | The name for your deployment |
| ‑p, ‑‑packages <names> | Custom packages to add to dependencies: "gulp, koa"
|
| -a, –arguments "force, debug"
(basically the names of the flags but without dashes) |
| -s, –single | Serve single page apps with only one index.html
in the root directory |
| –cache [seconds] | How long static files should be cached in the browser |
npm uninstall now-serve -g
npm link
npm start
Yeeha! Now can use the ns
command everywhere.