A few friends of mine know that I am in love with the Raspberry Pi. Especially, the instant tool set that Raspbian Jessie with Pixel provides is great. It is very easy to start coding. Almost like the old hacking days with XAMPP for PHP, MySQL and HTML. Unfortunately, I could not find any cool and fast tooling for NodeJS and CouchDB 2.0.
Therefore, I started my to create my own local development server. The procedure is described in my last blog article. This blog introduces a ready-made image file, which you can flash on your SD Card. The image contains these softwares pre-installed:
- Raspbian Jessie Lite (SSH enabled / Germany timezone / hostname: localdev)
- Git Client
- CouchDB 2.0
- NodeVersion Manager: Running NodeJS (version 6.9.5 and 7.5.0)
- Node Process Manager pm2
- Nginx Webserver 1.10.3
1. Downloading Image
The image can be download here:
If you have downloaded the file, then please prepare your SD Card. It is very important to use a SD Card bigger than 8GB!!! I created my image file based on a 8GB SD Card. Usually, the sizes of 8GB SD Cards vary by the manufactures. If you have a big enough SD Card, please format it (e.g. with SD Formater). Then flash / burn / copy it on your SD Card. I used the Win32DiskImager for this step, but the cross-platform tool Etcher should do job very well, too.
2. Start Raspberry Pi and adapt it
After successful burning, please stick the SD Card into your Raspberry Pi. Please, connect your Raspberry Pi with a network cable to your router or Ethernet hub. Turn it on and wait until the boot process is over.
The black window is supposed to open. The login is the same as the standard user/password:
Now you should be able to adapt the Pi for your needs. That could be:
- Change the ‘Locale’ via raspi-config command
- Change the ‘timezone’ via raspi-config command
- Change the keyboard via raspi-config command
- ‘Expand the filesystem’ via raspi-config command
- Configure your wifi
3. Understanding the infrastructure:
The NodeJS apps can be hosted within the Pi user’s home folder. Owner of the folder is of course the user pi:
/home/pi/ –> Folder for your NodeJS apps
All static and dynamic files for nginx webserver should be placed within this folder:
/home/nginx/www/ –> Folder for nginx Website
The owner of the ‘www’ folder is the user nginx. Please feel free to change it.
The CouchDB 2.0 database is already verified. There exist already a test user created by me. The login is:
url to the admin interface: http://localdev:5984/_utils/
That is in the beginning all you have to know. More detailed information about the installed tools is described here. However, from here you can start to install your own tools (e.g. Docker) and extend it based on your needs.
If you are not happy with my image file, then no problem. Please give Coder hosted by Google Creative Lab a try. It looks pretty cool and I hope it will get some further maintain.
If you are in love with fast and easy prototyping tools, then check these apps for your mobile apps: