可以用节点而不是meteor启动一个Meteor App?

如何用node而不是meteor启动Meteor App。 我试过这个:

 $ meteor create m; m: created. To run your new app: cd m meteor $ cd m; $ meteor; [[[[[ c:\git\m ]]]]] => Started proxy. => Started MongoDB. => Started your app. => App running at: http://localhost:3000/ Type Control-C twice to stop. # OK! This works :O) $ node .meteor\local\build\main.js; module.js:338 throw err; ^ Error: Cannot find module 'fibers' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (c:\git\m\.meteor\local\build\programs\server\boot.js:1:75) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) $ node .meteor\local\build\main.js; # OK! This does not work :O( $ cd .meteor\local\build\; $ npm install fibers; $ npm install semver; $ npm install source-map-support; $ npm install underscore; $ node main.js $ c:\git\m\.meteor\local\build\node_modules\fibers\future.js:267 throw(ex); ^ Error: Must pass options.rootUrl or set ROOT_URL in the server environment at Object.Meteor.absoluteUrl (packages/meteor/url_common.js:21:1) at Object.WebAppInternals.generateBoilerplate (packages/webapp/webapp_server.js:543:1) at Object.main (packages/webapp/webapp_server.js:739:1) at c:\git\m\.meteor\local\build\programs\server\boot.js:255:27 $ set ROOT_URL=localhost:3000; $ set ROOT_URL; ROOT_URL=localhost:3000 $ node main.js c:\git\m\.meteor\local\build\programs\server\boot.js:263 }).run(); ^ TypeError: Cannot read property 'slice' of null at packages/meteor/url_server.js:11:1 at c:\git\m\.meteor\local\build\programs\server\packages\meteor.js:1098:4 at c:\git\m\.meteor\local\build\programs\server\packages\meteor.js:1240:3 at c:\git\m\.meteor\local\build\programs\server\boot.js:222:10 at Function._.each._.forEach (c:\git\m\.meteor\local\build\node_modules\underscore\underscore.js:153:9) at c:\git\m\.meteor\local\build\programs\server\boot.js:117:5 

也许它需要更多的configuration?

您可以简单地使用demeteorizer: DEMETEORiZER ON GITHUB

在安装NPM之后,进入你的meteor应用程序目录并使用如下命令:demeteorizer –output [path]

然后转到您在[path]参数中给出的path,然后:

 npm install 

meteor应用程序使用以下环境variables:

MONGO_URL = '的mongodb://用户名:密码@主机:端口/数据库名称autoReconnect的=真正的'
ROOT_URL =' http://example.com '
MAIL_URL ='smtp:// user:password @ mailhost:port /'(可选)
PORT = 8080(可选,默认为80)

(显然,把你的参数放在上面的正确位置)

 npm start 

我真的推荐这种溶剂。 简单,完美,快捷。