chore: clean

This commit is contained in:
cha0s 2020-12-01 19:21:35 -06:00
parent fd446cfe80
commit 0c624655d6

View File

@ -44,13 +44,21 @@ export const $$latus = {
host: '127.0.0.1',
port: 6380,
}),
'@latus/core/up': ({config: {'@latus/redis': {docker, port}}}) => {
if ('production' !== NODE_ENV && docker) {
const args = [
'run',
'--rm',
'-p', `${port}:6379`,
'redis',
];
const {pid} = spawn('docker', args, {stdio: 'inherit'});
process.on('exit', () => process.kill(pid));
process.on('SIGINT', () => process.exit());
}
},
'@latus/repl/context': (plugins) => ({
redisClient: createClient(plugins),
}),
'@latus/core/up': ({config: {'@latus/redis': {docker, port}}}) => {
if ('production' !== NODE_ENV && docker) {
spawn('docker', ['run', '--rm', '-p', `${port}:6379`, 'redis'], {stdio: 'inherit'});
}
},
},
};