With the @cwire/nodejs-sdk you can easy integrate your nodejs backend to cwire.io.
npm
$ npm install @cwire/nodejs-sdk
Yarn
$ yarn add @cwire/nodejs-sdk
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)],
});