Skip to content

nanobox-quickstarts/nanobox-hapi

 
 

Repository files navigation

hapi from scratch

hapi from scratch

Run an hapi app locally, install nothing besides nanobox.

Clone the repo

# clone the code
git clone https://github.com/nanobox-quickstarts/nanobox-hapi.git

# cd into the hapi app
cd nanobox-hapi

Run the app

# Add a convenient way to access your app from the browser
nanobox dns add local hapi.dev

# Run hapi as you would normally, with Nanobox
nanobox run npm start

Check it out

Visit your app at hapi.dev:3000

Explore

With Nanobox, you don't have to have anything installed on your machine to run your app:

# drop into a Nanobox console
nanobox run

# where node is installed,
node -v

# your packages are available,
npm list

# and your code is mounted
ls

Clean things up (optional)

If you want to keep this project ignore this. If not, clean things up by removing the DNS entry:

nanobox dns rm local hapi.dev

Now What?

For more details about running hapi apps with nanobox visit guides.nanobox.io/nodejs/hapi/