The easiest way to start is to position NodeAtlas in the directory hosting your site and run the command
node-atlas. However there are options to launch more than launch the site.
Each of the commands that follow can be coupled with other like this:
$ node </path/to/>node-atlas/ --path hello-world --webconfig config.fr-fr.js --httpPort 80 --browse
$ node-atlas --lang fr-fr --httpSecure security/server --browse hello-world
To have help (open MAN) on the following command for the CLI, use
$ node-atlas --help
To know the current NodeAtlas version which is used with the CLI, just use the command
$ node-atlas --version
-b, --browse [subpath]
This command opens your browser to the address on which the site will run. Very handy when you do not remember the port for your development version. This command is useless if it is coupled with
--generate (see below).
$ node-atlas --browse
You could also targeted a specific page with the end of url.
$ node-atlas --browse index.html
-p, --path <path>
It is possible to launch NodeAtlas from another location where the website folder is placed. The
--path command will be very useful.
$ node-atlas --path </path/to/your/website/directory>/
-w, --webconfig <webconfigName>
By default, NodeAtlas will read your
webconfig.json file. It is possible that in addition to the file you created another
webconfig.prod.json file whose domain name is different. Or a
webconfig.fr-fr.json with URLs changes for another language. Instead of renaming your files in
webconfig.json before launching the site, simply enter your other configuration name. In the following example, this file will be
$ node-atlas --webconfig webconfig.alternatif.json
-H, --httpHostname <httpHostname>
You will maybe want know your IP with
ipconfig to change it in the url to access your website from others device connected to the current network so this command is for you.
$ node-atlas --httpHostname 192.168.1.1
-P, --httpPort <httpPort>
You will not be bored to change your listening port on your projects and sometimes you'll have to work on two different websites simultaneously. With this command you will not need to cut your sites turn to release the listener, simply pick one at launch.
$ node-atlas --httpPort 7778
If you change an item in your common variation file or even your view components called in multiple pages, you will not reload each page to update your output files. If so, simply use
--generate. This command will copy the entire contents of the folder
serverlessRelativePath if their path is different.
$ node-atlas --generate
You maybe want not use cached file during the development phase, the most easy way is to use this option. It's your only possibility for run a « Simple Web Server » with no cache.
$ node-atlas --cache
-c, --create [path]
NodeAtlas contain a directory
templates with predefined website into. To install them in the current directory for NodeAtlas command, you can use
--create with the name of the
templates you want use. By default, it's the
hello-world value that is used. Possible values:
$ node-atlas --create hello-world
-S, --httpSecure [pathName]
If you use the
--httpSecure option, all path will be reach in HTTPs. You must defined a
.key files with
pathName if you want the engine start in HTTPs. For exemple if you have
security/server.key from root of NodeAtlas website, you can use following command:
$ node-atlas --httpSecure security/server
-l, --lang <cultureCode-countryCode>
--lang parameter you will change language used by NodeAtlas. This command set the content of
languages/default.json by the content of
languages/fr-fr.json if you use the "fr-fr" parameter for example like below. Start NodeAtlas later will conserve the last language used by engine.
$ node-atlas --lang fr-fr