diff --git a/docs/en/getting-started.html b/docs/en/getting-started.html index 2ca85af0..f2892a9d 100644 --- a/docs/en/getting-started.html +++ b/docs/en/getting-started.html @@ -4,12 +4,12 @@ toggler.onclick = function() { nav.classList.toggle('docsSliderActive'); }; -
Edit this Doc

Getting Started

Install Metro using npm:

npm install --save-dev metro

Or via yarn:

yarn add --dev metro

Running metro #

Right now, Metro Bundler cannot run by itself. Instead, some functions are exposed so that the configuration can be passed into it. First, require the module by doing:

const metroBundler = require('metro');

Within the object returned, two main methods are given:

Method createServer(serverOptions) #

Given a set of options (same ones as the build method), a metro-server will be returned. You can then hook this into a proper HTTP(S) server by using its processRequest method:

'use strict';
+        
Edit this Doc

Getting Started

Install Metro using npm:

npm install --save-dev metro metro-core

Or via yarn:

yarn add --dev metro metro-core

Running metro #

Right now, Metro Bundler cannot run by itself. Instead, some functions are exposed so that the configuration can be passed into it. First, require the module by doing:

const metroBundler = require('metro');

Within the object returned, two main methods are given:

Method createServer(serverOptions) #

Given a set of options (same ones as the build method), a metro-server will be returned. You can then hook this into a proper HTTP(S) server by using its processRequest method:

'use strict';
 
 const http = require('http');
 const metroBundler = require('metro');
 const TerminalReporter = require('metro/src/lib/TerminalReporter');
-const Terminal = require('metro/src/lib/Terminal');
+const Terminal = require('metro-core/src/Terminal');
 
 const metroBundlerServer = metroBundler.createServer({
   assetRegistryPath: __dirname,