# Installation

Nodewood relies on Vagrant, VirtualBox, Ansible, and Yarn. Please make sure those are installed on your system before beginning, or you will encounter errors when trying to follow the rest of this tutorial.

# Create a project

  1. Install the Nodewood CLI with yarn add global @nodewood/cli.
  2. Log in at Nodewood and click on "Projects" in the sidebar. Click the "New Project" button, enter a project name, and click "Create". Copy the API Key and Secret Key returned to you.
  3. Run nodewood new DIR where DIR is the directory in which you want to create your app. Paste in your API Key and Secret Key when asked. Let it download and extract files, and run the installers.
  4. Change into your app's directory and run cp .env.template .env to create your environment file.
  5. Set up your mailer. (TBD)
  6. Edit your system's hosts file, and add the Development Virtual Machine's IP address (192.168.33.13 by default) linked to a convenient URL for development.
  7. Install project dependencies:
    nodewood vm
    cd code
    yarn install
    
  8. To run the Nodewood API:
    nodewood vm
    cd code
    nodewood dev api
    
  9. To run the Nodewood UI, open a separate terminal window:
    nodewood vm
    cd code
    nodewood dev ui
    

The Nodewood Express API server should now be running in your first terminal window, and any changes you make to shared or API code will cause it to automatically reload. The Nodewood UI should now have been built in your second terminal window, and any changes you make to shared or UI code will cause it to be automatically rebuilt.

If you visit https://your-url.com/app/signup, you can create your very first development user and begin using your Nodewood installation!

# Troubleshooting

# No local knex install found

If, when trying to run nodewood dev api, you are getting the No local knex install found error, make sure you run yarn install first.