Nowadays, I usually write technical blog posts over on the Guts Up! blog. However, I figured that I could write about some weekend leisure coding on my personal blog instead. (Also because I haven’t written anything here for a while!)
The great thing about leisure programming is that I play around with technology that (being prudent) I may not try out for commercial work. I’ve discovered most of my favourite design patterns, libraries, and languages via programming in my own time – and most of them do eventually make their way into my work code.
Here’s a quick rundown of what was involved:
- I started by following instructions from the official blog post on how to setup a CoffeeScript project on nodester.
- Looks like the the code snippet indentation is wrong (or not displayed properly in my browser), but it’s a quick fix.
- The blog post notes that the fixed port will need to be changed to a nodester-provided port. Also a quick change.
- Hmmm, getting a 503. Check the log file. Turns out the coffee-script package isn’t installed on the remote server.
- Finally get it working by adding a package.json file (defining the nodejs version and adding a coffee-script dependency) and running:
nodester npm install [appname]
(I’ve omitted the appname because it’s kind of a surprise for someone. Although it’s probably something that is easy enough to find out.)
Now that it’s working, I create a git repository on bitbucket and push the code there for version control. When setting up the nodester app, I created a local git repository (and “nodester” remote for deployment), so this is very straightforward. I just add the bitbucket repository as the remote origin, and then push the local git repository to it.
So now I have a small CoffeeScript server program that can deploy to nodester, with code hosted at bitbucket. All free and online. Good stuff!
Hmmm, I’m not sure what I really wanted to illustrate with this blog post. Maybe that there are very few barriers to getting web services up and running, and that programming is essentially the process of solving a series of (mostly very small) problems (usually by researching solutions and following instructions).