Skip to content

akzhan/perl-YourCompany-Project

Repository files navigation

YourCompany Project in Perl Build Status codecov License: MIT License: Whiskey

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.

Installation

Requirements:

  • Perl 5.20+
  • cpanm
cpanm --installdeps .

# for development purposes
cpanm --installdeps --with-develop .

Database

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 protected]'

Configuration

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.

Usage

Run

bin/http # to run HTTP server
bin/cli routes # mojo cli

Unit tests

prove t -r

Critique

bin/plint lib

REPL

bin/re.pl

psql

bin/psql

pgcli

Install pgcli.

bin/pgcli

Swagger UI

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.

CREDITS

Releases

No releases published

Packages

No packages published

Languages