mirror of
https://github.com/strapi/strapi.git
synced 2025-07-13 03:51:54 +00:00
27 lines
461 B
JavaScript
27 lines
461 B
JavaScript
![]() |
#!/usr/bin/env node
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
const { run } = require('../dist/index.js');
|
||
|
const readline = require('readline');
|
||
|
|
||
|
if (process.platform === 'win32') {
|
||
|
const rl = readline.createInterface({
|
||
|
input: process.stdin,
|
||
|
output: process.stdout,
|
||
|
});
|
||
|
|
||
|
rl.on('SIGINT', function sigint() {
|
||
|
process.emit('SIGINT');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
process.on('SIGINT', () => {
|
||
|
process.exit(1);
|
||
|
});
|
||
|
|
||
|
run(process.argv).then(
|
||
|
() => process.exit(0),
|
||
|
() => process.exit(1)
|
||
|
);
|