# data[].attributes.body
var express = require('express');
var bodyParser = require('body-parser');
var { Sequelize, Model, DataTypes } = require('sequelize');

var app = express();
const HTTP_PORT = 8080;

const sequelize = new Sequelize({
dialect: 'sqlite',
storage: './user_db.sqlite'
})

class User extends Model {};
User.init({
name: DataTypes.STRING,
email: DataTypes.STRING
}, { sequelize, modelName: 'user' });

sequelize.sync();

app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

app.get("/users/", async (req, res) => {
const users = await User.findAll();
res.json(users);
});

app.post("/users/", async (req, res) => {
const user = await User.create(req.body);
console.log(req.body);
res.json(user);
});

app.get("/", async (req, res) => {
res.json({"hola": "mundo"});
});

app.listen(HTTP_PORT, () => {
console.log("A");
})

# data[].attributes.attachment_link.description
Create a new document and edit with others at the same time -- from your computer, phone or tablet. Get stuff done with or without an internet connection. Use Docs to edit Word files. Free from Google.

# data[].attributes.body
https://docs.google.com/document/d/1WrySdUkkfs_qkkvEDXjarzH2U0N5mBCPszcFkhsi_k0/edit?usp=sharing