This commit is contained in:
2023-10-17 16:30:56 -04:00
parent a3ee24800c
commit 956bc23ee4
5 changed files with 53 additions and 2 deletions

View File

@@ -26,7 +26,7 @@
<th> </th>
<th>Candidate</th>
</tr>
<!-- INJECT0 -->
<!-- INJECT -->
</table>
<br>

View File

@@ -27,7 +27,7 @@
<th style="width:50%"><span id="spanid"> </th>
<th>Happiness</th>
</tr>
<!-- INJECT0 -->
<!-- INJECT -->
</table>
<br>

View File

@@ -2,9 +2,14 @@ var express = require('express')
var bodyParser = require('body-parser')
var fs=require('fs')
var hashindex=require('hash-index')
var fc=require('./filechunker.js')
var app = express()
var PlurVoteTemplate=fc("./plurvote.html");
console.log(PlurVoteTemplate);
console.log("Foo!");
var Candidates=[
"Chris Christie",

39
results.html Normal file
View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Ballot Experiments Results</title>
</head>
<body>
<style>
form, table, th, td {
border:1px solid black;
border-collapse: collapse;
}
</style>
Here are the results by Range Voting:
<br>
<table>
<tr>
<th> </th>
<th>Candidate</th>
</tr>
<!-- INJECT -->
</table>
<br>
And here are the results by Plurality Voting:
<table>
<tr>
<th> </th>
<th>Candidate</th>
</tr>
<!-- INJECT -->
</table>
<br>
</body>

7
test.js Normal file
View File

@@ -0,0 +1,7 @@
import { Client } from 'pg'
const client = new Client()
await client.connect()
const res = await client.query('SELECT $1::text as message', ['Hello world!'])
console.log(res.rows[0].message) // Hello world!
await client.end()