A simple development server for DoneJS projects.
npm install done-serve
To start a full server that hosts your application run:
node_modules/.bin/done-serve --port 3030
In your application folder.
The following options can be specified from the command line:
Specify the port the server should run on. If unspecified this port will be one of:
- the
PORT
environment variable 3030
Proxy a local path (default: /api
) to the given URL (e.g. http://api.myapp.com
).
Set the proxy endpoint (default: /api
).
Turn off SSL certificate verification.
Start a live-reload server so any code changes will be reflected immediately.
Only serve static files, do not perform server-side rendering. Notably this is useful when debugging an issue in the app.
Specifies the name of a cookie that done-ssr will use to enable JavaScript Web Token (JWT) auth.
A comma-separated string of domain names that are authorized to receive the JWT token. Required if --auth-cookie
is used.
Specify a timeout for server rendering. If the timeout is exceeded the server will return whatever has been rendered up until that point. (default: 5000
)
Enable debug information in case of a timeout. The debug information will be appended to the document as a modal window and provides stack traces. Only use this flag during development.
You can also use the server, with the same options, from JavaScript:
var server = require("done-serve");
server({
path: "path/to/dir"
});
MIT