backend ported to node.js (work in progress)

This commit is contained in:
azivner
2017-10-14 23:31:44 -04:00
parent 14acacf2e9
commit cc3a621324
26 changed files with 2118 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
const express = require('express');
const router = express.Router();
const sql = require('../sql');
router.get('/:noteId', async (req, res, next) => {
const noteId = req.params.noteId;
const history = await sql.getResults("select * from notes_history where note_id = ? order by date_modified desc", [noteId]);
res.send(history);
});
module.exports = router;