Skip to content

Commit

Permalink
fixing paths
Browse files Browse the repository at this point in the history
  • Loading branch information
moski committed Dec 17, 2008
1 parent 538e814 commit b96343a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/blog_app.hrl
Expand Up @@ -3,5 +3,4 @@
-define(DB_PASSWORD, "erlang").
-define(DB_DATABASE, "blog").
-define(DB_POOL_SIZE, 50).
%-define(APP_PATH, "/home/yariv/apps//twoorl").
-define(APP_PATH, "/Users/Moski/erlang/apps/blog").
Binary file added src/start.beam
Binary file not shown.
19 changes: 12 additions & 7 deletions src/start.erl
@@ -1,16 +1,21 @@
-module(start).
-export([boot/0, boot/1]).

-include("blog_app.hrl").

boot() ->
boot(true).
boot(true).

boot(false) ->
compile();
compile();

boot(true) ->
mysql_start(),
compile().
mysql_start(),
compile().

mysql_start() ->
erlydb:start(mysql, [{hostname, ?DB_HOSTNAME}, {username, ?DB_USERNAME}, {password, ?DB_PASSWORD}, {database, ?DB_DATABASE}]).

mysql_start() -> erlydb:start(mysql, [{hostname, "localhost"}, {username, "erlang"}, {password, "erlang"}, {database, "blog"}]).
compile() -> erlyweb:compile("/Users/Moski/erlang/apps/blog", [{erlydb_driver, mysql}]).
compile() ->
erlyweb:compile(?APP_PATH, [{erlydb_driver, mysql}]).


0 comments on commit b96343a

Please sign in to comment.