mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
14 lines
487 B
JavaScript
14 lines
487 B
JavaScript
// Adapted from https://github.com/mapbox/node-sqlite3/wiki/API, which is
|
|
// part of the node-sqlite3 project, which is licensed under the BSD 3-Clause
|
|
// License; see file node-sqlite3-LICENSE.
|
|
var express = require('express');
|
|
var sqlite3 = require('sqlite3').verbose();
|
|
var db = new sqlite3.Database(':memory:');
|
|
|
|
var io = require('socket.io')();
|
|
io.on('connection', (socket) => {
|
|
socket.on('newuser', (handle) => {
|
|
db.run(`INSERT INTO users(name) VALUES ${handle}`);
|
|
});
|
|
});
|