项目作者: schwartzadev

项目描述 :
A server-side notes application using MySQL and Javalin (Jetty)
高级语言: Java
项目地址: git://github.com/schwartzadev/notes.git
创建时间: 2017-08-08T01:35:43Z
项目社区:https://github.com/schwartzadev/notes

开源协议:

下载


notes

A server-side notes application using MySQL and Javalin (based on Jetty)
Screenshot of Notes Draft

setup

MySQL

You will need to install MySQL to use this project.

  1. Make a Notes database: create database notes;
  2. Add the notes table with schema:
    1. CREATE TABLE `notes` (
    2. `id` int(11) NOT NULL,
    3. `title` varchar(255) DEFAULT NULL,
    4. `body` varchar(5000) DEFAULT NULL,
    5. `color` varchar(6) DEFAULT NULL,
    6. `archived` tinyint(1) DEFAULT '0',
    7. `html` varchar(10000) DEFAULT NULL,
    8. `user_id` int(11) DEFAULT NULL
    9. `ispinned` tinyint(1) NOT NULL DEFAULT '0'
    10. )
  3. Add the users table like so:
    1. CREATE TABLE `users` (
    2. `id` int NOT NULL,
    3. `username` varchar(255) NOT NULL,
    4. `password` varchar(255) NOT NULL,
    5. `isactive` tinyint(1) DEFAULT NULL
    6. )
  4. Add the logins table with this schema:
    1. CREATE TABLE `logins` (
    2. `id` int NOT NULL,
    3. `user_id` int NOT NULL,
    4. `random` varchar(255) NOT NULL,
    5. `name_hash` varchar(255) NOT NULL,
    6. `date_created` datetime NOT NULL
    7. )

Config

You will also have to make a config.json file to hold your SQL information. It should look like this:

  1. {
  2. "SQL" : {
  3. "username" : "myname",
  4. "password" : "mypass",
  5. "url" : "jdbc:mysql://localhost/NOTES?etcetcetc"
  6. }
  7. }

Once you have made the database and the config file, you should be ready to go. Run the program by running Main.main()