|
@@ -10,10 +10,16 @@
|
|
|
|
|
|
%% API.
|
|
|
|
|
|
+%% NOTE:
|
|
|
+%% If size of db testpool is too big (e.g: 5000),
|
|
|
+%% it will fail travis ci test. So I shrink this to 256.
|
|
|
+%% [email protected]
|
|
|
+
|
|
|
+
|
|
|
start(_Type, _Args) ->
|
|
|
crypto:start(),
|
|
|
application:start(emysql),
|
|
|
- emysql:add_pool(test_pool, 5000,
|
|
|
+ emysql:add_pool(test_pool, 256,
|
|
|
"benchmarkdbuser", "benchmarkdbpass", "localhost", 3306,
|
|
|
"hello_world", utf8),
|
|
|
emysql:prepare(db_stmt, <<"SELECT * FROM World where id = ?">>),
|
|
@@ -24,7 +30,7 @@ start(_Type, _Args) ->
|
|
|
{"/query", query_handler, []}
|
|
|
]}
|
|
|
]),
|
|
|
- {ok, _} = cowboy:start_http(http, 5000, [{port, 8080}], [
|
|
|
+ {ok, _} = cowboy:start_http(http, 256, [{port, 8080}], [
|
|
|
{env, [{dispatch, Dispatch}]}
|
|
|
]),
|
|
|
hello_world_sup:start_link().
|