@fibjs/node

1.0.0-beta.0 • Public • Published

@fibjs/node

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Node.js runtime which works on fibjs platform. you should use this module only when you want use some Node.js's module, please use fibjs native module first!

Install

$ npm i @fibjs/node --save

Usage

const node = require('@fibjs/node');
const mod1 = node('mod1');
const mod2 = node.require('mod2');

// or you can run a js file
node.run('./app.js'); // path to js file

Also, this module can be used as a cli. You can invoke like this:

$ ./node_modules/.bin/node app.js

API

  • node() require a npm module.
  • node.require() require a npm module.
  • node.run() execute a Node.js js script file.

Questions & Suggestions

Please open an issue here.

License

MIT

Package Sidebar

Install

npm i @fibjs/node

Weekly Downloads

1

Version

1.0.0-beta.0

License

MIT

Last publish

Collaborators

  • ngot
  • ngot-fibjs