UNPKG

datoit

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite

27 lines (21 loc) 527 B
'use strict'; const REPL = require('repl'); const strapi = require('../index'); /** * `$ strapi console` */ module.exports = () => { // Now load up the Strapi framework for real. const app = strapi(); app.start(() => { const repl = REPL.start(app.config.info.name + ' > ' || 'strapi > '); // eslint-disable-line prefer-template repl.on('exit', function(err) { if (err) { app.log.error(err); process.exit(1); } app.server.destroy(); process.exit(0); }); }); };