Setup the database with something like the following:
CREATE USER 'pasteuser'@'localhost' IDENTIFIED BY 'pastepass';
CREATE DATABASE IF NOT EXISTS paste;
USE paste;
CREATE TABLE IF NOT EXISTS paste (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
code TEXT,
time_created TIMESTAMP,
data BLOB
);
GRANT SELECT, INSERT, UPDATE, DELETE ON paste.paste TO 'pasteuser'@'localhost';
FLUSH PRIVILEGES;
This project was inspired by pxqz by my friend Uiri.
Additional inspiration (particularly for the nickel.rs routing and layout) from superlogical/rusty.
Dependencies used:
- nickel.rs
- rust-url
- my fork of rust-mysql-simple