GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing www.mediawiki.org — Service-template-node/UsefulCommands - MediaWiki
Useful Commandsnpm 101npm is the package manager for Node.js modules. It is used for managing and publishing modules. The template (and your future service) needs its dependencies to be present. Install them with:
Sometimes the configuration can get a bit messed up you may experience strange npm-related errors when running your service. The remedy is:
If you need to add a dependency, this will install it and add it your
Service-related TasksThe template comes with some handy
Starting unit tests is as easy as:
A code coverage utility is also available:
Once the script finishes, open up DockerIncluded in the template is also a Dockerfile, allowing you to run and test your service in a production-like environment inside of a Docker container. You need to have docker installed if you are on a Linux host, or boot2docker in case of OSX/Windows hosts. To start your service in the container, execute:
The first time you run it, it takes a while as the script automatically builds the full image and then starts the service. If you want to test your service instead, use:
Similarly, to run code coverage, run:
Note: On Linux hosts, running
After you log out completely and log back in, you should be able to run the above scripts without resorting to DeploymentSee this document for how to get ready to deploy your service. | ||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |