[Solved] Start meteor server from a gulp/npm task?

I’ve started a project using the wonderful yeoman Foundation Vue Yeoman generator. It uses browser sync and a zillion npm tasks to ease Vue frontend code development.

It would be really nice if I didn’t have to start meteor separately from my typical gulp serve command. Anyone managed to run meteor from node or gulp?

The end goal is to start meteor as a npm/gulp task, such as npm run or gulp serve.

you can create your own task easily that spawns a child process and starts the meteor server.

import cp from 'child_process';

const child = cp.exec('meteor', { cwd: <directoryToRunMeteorIn>, stdio: [process.stdin, process.stdout, process.stderr] });

2 Likes