@cwire/nodejs-sdk
v0.3.9
Published
CWire helps your to build awesome frontend for administration tasks
Downloads
43
Readme
@cwire/nodejs-sdk
With the @cwire/nodejs-sdk you can easy integrate your nodejs backend to cwire.io.
Install
npm
$ npm install @cwire/nodejs-sdk
Yarn
$ yarn add @cwire/nodejs-sdk
Small example
For more please checkout our docs or code examples
import express from 'express';
import { DataTypes, Model, Sequelize } from 'sequelize';
import { CWire, SequelizeDataModel } from '@cwire/nodejs-sdk';
const sequelize = new Sequelize('sqlite::memory');
class User extends Model {}
User.init({
field: {
allowNull: false,
type: DataTypes.STRING,
},
}, {
sequelize,
modelName: 'T_USERS'
});
await CWire.init("<YOUR_API_KEY>", {
models: [new SequelizeDataModel(User)],
});