Start Application

Jet.js has a development web server to run an application. It does not require any additional software. A development server is a part of the jetc package.

Install Server

To install a web server, use:

$ npm install jetc

This command installs a Jet.js web server server.js into the application’s bin folder.

Install verifies if bin/server.js exists before creating it. If it already exists, it will not get overwritten.

To run a server, install adds a start script into the package.json.

If package.json does not exist or the start script is already configured, the install will skip this step.

Start Server

To start a web server, use:

$ npm start

By default, the web server starts on localhost port 3000. To use a different port, add a port number as a parameter to the command line:

$ npm start 8080

Open Webpage

Open a webpage http://localhost:3000/ in the browser.

Replace the port number in the URL, if the server uses a non-default port.

Jet.js built-in web server is designed only for local development. For production deployments, use web servers that are ready to serve high loads, such as Apache or Nginx.