Autostarts your development servers so that you can be more productive
With katon, there's no need anymore to open a Terminal and manually start developement servers each time you want to develop.
Instead, add your development servers once to katon and they'll be autostarted and always accessible on local .ka domains.
Click here to view a screenshot of katon + Express + Rails
katon supports any server: Node, Ruby, Python, Go, Java, PHP, ... that can be started with a command-line and runs on Mac OS (Yosemite included).
Make sure Node is installed first, then:
$ npm install -g katon
$ sudo katon install && katon start
$ katon add 'nodemon'
$ katon add 'npm start'
$ katon add 'grunt server'
$ katon add 'rails server --port $PORT'
$ katon add 'python -m SimpleHTTPServer $PORT'
To add a server with a different name than its directory.
$ katon add 'grunt server' my-custom-name
Application is now available at http://my-custom-name.ka
Note: it's important to use '
and not "
to avoid $PORT
to be evaluated.
Port is dynamically set by katon using PORT
environment variable but can be passed as a parameter using $PORT
.
In case your server doesn't accept a port parameter, you can retrieve the PORT
environment variable in your code. For example, for a Node server you would write something like:
var port = process.env.PORT || 3000;
The same technique can be applied with other languages too.
katon works with any version manager, simply set the desired version before adding your server and katon will remember it.
$ nvm use 0.11 && katon add 'npm start'
$ rbenv local 2.0.0-p481 && katon add 'rails server --port $PORT'
For Node users, to keep access to katon CLI accross Node versions, add an alias to your .profile and reopen the Terminal.
echo "alias katon=`which katon`" >> ~/.profile
If you have missing gems errors, see issue#32. Future releases of katon should make it easier to add.
When adding a server, you can access it by its URL http://app.ka
. But you can also use subdomains (e.g. http://foo.app.ka
, http://bar.app.ka
, ...).
katon is also fully compatible with xip.io service.
Server logs are stored in <server_dir>/katon.log
, to view them run:
$ tail -f katon.log
Run katon status
or check ~/.katon/daemon.log
.
If you're stuck, feel free to create an issue.
$ npm rm -g katon
This will run the uninstall script wich does basically katon stop && sudo katon uninstall
. To remove katon completely, run also rm -rf ~/.katon
.
katon is released under the MIT License.