Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @faasjs/provider-sqlite with all npm packages installed. Try it out:

var providerSqlite = require("@faasjs/provider-sqlite")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@faasjs/provider-sqlite v0.0.0-alpha.4

@faasjs/provider-sqlite

Sqlite 适配

License: MIT Build Status Coverage Status NPM Stable Version NPM Beta Version

接口文档

How to use?

  1. Add npm to package.json: yarn add @faasjs/provider-sqlite@beta;
  2. Config connection info in providers folder, support host, user, password and database;
  3. Use it in flow:
new Flow({
  resources: {
    sqlite: {}
  }
}, async function(){
  const results = await this.sqlite.query('SELECT user from id = ?', ['1']);
  console.log(results[0].id); // => 1
})
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free