/Thalia

My custom node.js server

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Thalia

Thalia is a nodejs server, which allows for simple serving of multiple websites from one instance.

This allows me to quickly create a new project folder and get to work. It contains a basic HTML5 boilerplate that sets you up with bootstrap, jquery, datatables & d3.js

The project folders can be git repos or shared with Dropbox if you're collaborating with less technical people. I often share these folders with friends who are learning to code so we have a shared workspace, or in hackathons when work needs to be synced across the team quickly and put online instantly.

Quickstart

To install, download the repository then run:

npm install
npm gulp build
npm start

Note that npm start needs your admin password because it will start serving the website on port 80

Use gulp serve if you want to develop stuff.

If you want to start a new project, just copy the example folder and rename it. run gulp serve --site "folder_name" to start developing in that site. Note that running gulp will delete and rebuild the public folder from the src folder so I recommend only developing this way if all your developers know what the're doing. If it's just a simple Dropbox-shared project with a bunch of non-developers on your team, maybe stay away from using gulp.

To test, run:

npm test

To develop, run:

./develop.sh example

This will tell gulp to watch a single folder: websites/example/src, outputting anything you write to websites/example/public, and serving it using Thalia on port 1337, and using browsersync on port 3000.

Features

Besides simple serving of a public folder, Thalia can also do:

I should probably explain how to use those things, but I've written enough here and don't think anyone is going to read this anyway. If you want to know more about this ping me on Twitter asking for more documentation or raise a github issue.

-David @Frostickle

To do:

  • Add more tests
  • Write an init script to start a new project

Thanks

Thanks @cferdinandi for Gulp Boilerplate, from which my gulp script for v3 was adapted.

Thanks @slavanossar for Thirst Quencher, from which my gulp script for v2 was adapted.