Skip to content

Commit

Permalink
updates app startup
Browse files Browse the repository at this point in the history
  • Loading branch information
videlalvaro committed Mar 8, 2012
1 parent dc6b53b commit 400755f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
16 changes: 15 additions & 1 deletion README
Expand Up @@ -10,7 +10,13 @@ This project was part of a hackday at [Liip](http://www.liip.ch). The app was bu

Simply clone the project and then run make:

$ git clone git://github.com/videlalvaro/todos_hackday.git todos
$ cd todos
$ make

Then create your own configuration file by copying the sample one and then editing the MySQL configuration:

$ cp ./priv/hackday.conf.sample ./priv/hackday.conf

# MySQL Setup #

Expand All @@ -21,4 +27,12 @@ Create the following table:
`title` varchar(256) DEFAULT NULL,
`isDone` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
) ENGINE=InnoDB DEFAULT CHARSET=utf8

# Running the app #

Cd into the `todos` folder and run the following command:

$ ./start.sh

Then open [localhost:8000](localhost:8000)
9 changes: 9 additions & 0 deletions priv/hackday.config.sample
@@ -0,0 +1,9 @@
[
{hackday, [
{mysql_host, "localhost"},
{mysql_port, 3306},
{mysql_user, "user"},
{mysql_pass, "pass"},
{mysql_database, "hackday"}
]}
].
3 changes: 2 additions & 1 deletion start.sh
@@ -1,3 +1,4 @@
#!/bin/sh
cd `dirname $0`
exec erl -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -s reloader -s hackday
exec erl -pa $PWD/ebin $PWD/deps/*/ebin -boot start_sasl -s reloader -s hackday -config ./priv/hackday

0 comments on commit 400755f

Please sign in to comment.