0

I am using API of Parcel bundler to build and start a local server.

const Bundler = require('parcel-bundler');

let entryFile = ...;
let options = ...;

(async function() {
    let bundler = new Bundler(entryFile, options);
    let b = await bundler.serve();
)();

I would like to stop the server at some point. I cannot find this in their documentation. Is there a method that allows me to stop the server?

Luka
  • 2,779
  • 3
  • 17
  • 32

2 Answers2

1

Yes, there is a method close.

    let bundler = new Bundler(entryFile, options);
    let b = await bundler.serve();

    b.close();
Luka
  • 2,779
  • 3
  • 17
  • 32
0

From The command line:

use the command : ctrl + c

SomeOne
  • 51
  • 4