paint-brush
How to create a DoneJS app in 3 easy stepsby@skdomino
669 reads
669 reads

How to create a DoneJS app in 3 easy steps

by Steve DominoJanuary 12th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The major benefit of using a framework like <a href="http://donejs.com/" target="_blank">DoneJS</a> is it allows you to focus on development rather than boilerplate.
featured image - How to create a DoneJS app in 3 easy steps
Steve Domino HackerNoon profile picture

The major benefit of using a framework like DoneJS is it allows you to focus on development rather than boilerplate.

Another tool that provides a similar benefit is Nanobox. It creates instant, isolated, development environments, so you don’t have to worry about things like language versions, version managers, global dependency conflicts, etc. So download Nanobox and lets get started!

Step 1: The boxfile.yml

Nanobox uses a [boxfile.yml](https://docs.nanobox.io/boxfile/) to configure your environment; create one at the root of your project:



# boxfile.ymlrun.config:engine: nodejs

Step 2: Create a DoneJS app

Just before creating the app add a convenient way to access it from the browser with nanobox dns add local done.dev.

Now use nanobox run to create your applications environment and drop into a console:

Install DoneJS by running yarn add donejs.

With DoneJS installed change to the /tmp directory and create your application. Once the app has been created move its contents into your project folder and change directories back there.



# cd into /tmp and create the applicationcd /tmpdonejs add app myapp


# copy the contents of your new donejs app to your project rootcp -ar ./myapp/. /app


# return to your project rootcd /app

Step 3: Run your application

Run npm start to start your app:

With your app running you can visit it in a browser using the custom domain you added earlier: done.dev:8080.

Thats it!