The bootstrap procedure must be done before the first start.

The bootstrap will create the various tables, the admin user,
and the initial content of the platform, with the possibility
to add replication for everything.
main
absc 2024-08-02 22:53:04 +02:00
parent 60989b17cd
commit c6328bd174
1 changed files with 0 additions and 12 deletions

View File

@ -29,18 +29,6 @@ start(_Type, StartArgs) ->
{ok, Port} = application:get_env(port), {ok, Port} = application:get_env(port),
case storage:create(?APPBUCKET) of
ok -> bootstrap(?APPBUCKET);
{error, {already_exists, ?APPBUCKET, _}} -> ok;
_ -> exit(blog_storage_init_failed)
end,
case storage:create(?USERSBUCKET) of
ok -> ok;
{error, {already_exists, ?USERSBUCKET, _}} -> ok;
_ -> exit(users_init_failed)
end,
Dispatch = cowboy_router:compile([ Dispatch = cowboy_router:compile([
{'_', [{"/user", dudeswave_user_handler, #{bucket => ?USERSBUCKET}}]}, {'_', [{"/user", dudeswave_user_handler, #{bucket => ?USERSBUCKET}}]},
{'_', [{"/", dudeswave_handler, #{bucket => ?APPBUCKET}}]} {'_', [{"/", dudeswave_handler, #{bucket => ?APPBUCKET}}]}