title | description | source | edit | masthead |
---|---|---|---|---|
Initial Setup |
Get the tools you need to start making things with Maki. |
/img/digital-texture.jpg |
If you're already familiar with the developer basics, you're ready to get your developer environment set up.
This process will consist of installing several new applications on your computer that will become part of your toolbox, which you will use to craft new applications. Don't worry if you feel uncomfortable with your new tools, experience will come with time and use.
This process can also be very different depending on which operating system you're using, so we encourage you to ask for help if you need it. We're going to be writing these guides for the Mac OSX operating system.
If something doesn't work, try closing the Terminal and re-opening it! If you still get an error on the step you're on, ask for help in #learning.
OSX doesn't come with an easy way of managing applications by default, so we need to install one. A "Package Manager" is a phrase used to describe an application that manages the updates and upgrades to other applications – we're going to use one called Homebrew, which you can learn more about at brew.sh.
Installing Homebrew is simple. Open your Terminal1, and paste the following into it2:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It will probably ask you for your password, which you should enter. It will
work for some time and provide some output, with a few questions – watch and
wait, until it gives you a blinking cursor again. At the end, it will give you
some instructions (probably to run brew doctor
), and you should follow them.
At this point, you're done with Step 1.
- CMD+Space, then type "terminal", and press enter.
- Copy and pasting from a webpage into the command line is very dangerous, so be wary when someone asks you to do it. For now, it is the easiest way to help you! _Some_ developers provide instructions on how to safely follow instructions such as pasting into your terminal, but not all – you'll want to learn about cryptography, TLS, and PGP if you want to be a responsible developer. That's for a later tutorial, though.
Maki is an application framework built primarily with a programming language and application runtime named Node.js, or just Node for short. Node will run our programs exactly as we instruct it to, and it gives us some features that basic JavaScript cannot. You can learn more about Node on its website, nodejs.org.
The best way to install and manage the Node application is NVM. Since we installed
a package manager (brew
) in Step 1, all we need to do is type the following
into our terminal:
brew install nvm
Again, if it asks for your password, you should enter it to give Homebrew permission to install NVM. Some work will take place, and eventually you will get a blinking cursor again.
Now we can install a specific version of Node. We want 4.2, so we'll instruct NVM to give it to us:
nvm install 4.2
Some work will be completed, and you'll eventually be left with our friendly blinking cursor. Now let's make sure every time we use Node, we use this version by default:
nvm alias default 4.2
You can test that Node is now correctly installed and working with the following JavaScript "Hello World":
echo "console.log('Hello, world.');" | node
If it responds with a simple "Hello, world.", your work here is done.
Maki currently requires a specific database, so we need to install that too:
brew install mongodb
Careful: some instructions will be output after this command that you should read and follow. We recommend you start MongoDB automatically, and start it immediately:
("code missing from tutorial")
You're done, and ready to follow the Hello World tutorial.