Modern Web project in Perl using Mojolicious and DBIx::Class.
Local configuration settings were embedded into the repository to reduce the learning curve.
This application respond to /projects
and /api/projects
routes (see bin/cli routes
for details).
Also application respond to /todos
routes of Todo Backend example.
/api/projects
route also provides implementation of OpenAPI protocol.
Requirements:
- Perl 5.20+
cpanm
cpanm --installdeps .
# for development purposes
cpanm --installdeps --with-develop .
Note that our boilerplate depends on Postgres 9.5+.
You should create user and database.
psql postgres
postgres => CREATE USER yourself PASSWORD 'protected';
postgres => CREATE DATABASE yourdatabase OWNER=yourself ENCODING=utf8;
postgres => \q
and, as usually, do "sqitch deploy".
By default, Sqitch will read sqitch.conf in the current directory for settings. But it will also read ~/.sqitch/sqitch.conf for user-specific settings. Get it from git and setup.
sqitch config --user user.name 'user_login'
sqitch config --user user.email 'email@example.com'
Usually You need to override config/defaults.yml, config/development.yml, config/test.yml, config/production.yml with config/local.yml and exclude local settings from VCS tracking.
bin/http # to run HTTP server
bin/cli routes # mojo cli
prove t -r
bin/plint lib
bin/re.pl
bin/psql
Install pgcli.
bin/pgcli
YourCompany Project supports OpenAPI and allows to visualize and interact with the API’s resources through Swagger UI.
Simply do
git submodule update --init
bin/http
and open its swagger page.
- All together to @akzhan.
- Database plan to Max Travinichev @travinichev.
- Mojolicious application to Vladimir Melnichenko.
- find or throw pattern to Eugen Konkov @KES777.
- Hint to aliasing of core functions to Anton Petrusevich @jef-sure.