CLI to quickly generate the file and folder structure for a basic hof app
hof-generator should be installed globally to allow access to the hof
command on $PATH
npm install -g hof-generator
Create a brand new hof project in a directory:
$ hof init [dir] [--app <name>]
dir
- the root directory of your application - Default.
app
- the name of your first application - Defaults to the name of the target directory
Create a new app in an existing hof project:
$ hof app <name>
name
- the name of the application to add - Required
Once you have created a new app, you can run it locally with npm start
- Note: this will need a local redis instance running. You can then access your service in a browser at http://localhost:8080
.
Alternatively, a basic docker-compose configuration is included, which will bundle redis and an nginx proxy. Run docker-compose up
to start these services. You can then access your service in a browser at https://localhost
.