StoryCMS package for the AdonisJS framework
This library depends on three AdonisJS
core libraries: @adonisjs/auth
,
@adonisjs/lucid
and @adonisjs/session
.
# NPM
npm i @story-cms/adonis
Create a migrations directory if it doesn't exist.
mkdir -p database/migrations
node ace configure @story-cms/adonis
node ace migration:run
Complete the installation by registering the below named middleware inside your
start/kernel.ts
file.
Server.middleware.register([
() => import('@ioc:EidelLev/Inertia/Middleware'),
() => import('@ioc:Adonis/Core/BodyParser'),
() => import('@ioc:StoryCms/Core/VersionContext'), // 👈
]);
Server.middleware.registerNamed({
auth: () => import('App/Middleware/Auth'),
admin: () => import('@ioc:StoryCms/Core/AdminMiddleware'), // 👈
});
This project happily accepts contributions.
If you have a question or found a bug, feel free to open an issue.
- add routes
- add .env.example