|
add to collection
+
| |
Start slideshow
0
0
0
0
0
Please login to manage your collections.

Desivdo 1 ◆ 〈SAFE〉

const request = require('supertest'); const app = require('../index'); // express app

const createItem = (title, description) => const stmt = db.prepare('INSERT INTO items (title, description) VALUES (?, ?)'); const info = stmt.run(title, description); return getItemById(info.lastInsertRowid); ; Create an Express app with routes under /api/items. desivdo 1

router.post('/', (req,res) => ); Static single-page interface using vanilla JS. const request = require('supertest'); const app = require('

async function fetchItems() const res = await fetch('/api/items'); const items = await res.json(); render(items); const request = require('supertest')