An online community for yarn crafters.
Log in to access pattern, yarn and tools tracking.
- Node 6.9.1
- NPM 4.0.2
- MySQL 5.7
From within the root directory:
$ npm install
- Create a database named 'emanie'.
- In 'emanie', use the following queries to create four tables:
Profiles Table:
CREATE TABLE IF NOT EXISTS profiles (
id int(11) NOT NULL AUTO_INCREMENT,
email varchar(50) UNIQUE,
displayName varchar(20) DEFAULT 'user',
pic varchar(50) DEFAULT '../img/defaultIcon.png',
craftName varchar(20),
bio varchar(150),
authId varchar(30) UNIQUE,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Patterns Table:
CREATE TABLE IF NOT EXISTS patterns (
id int(11) NOT NULL AUTO_INCREMENT,
authId varchar(30),
email varchar(50),
pName varchar(20),
craft varchar(20),
tools varchar(50),
notes varchar(500),
src varchar(100),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Yarn Table:
CREATE TABLE IF NOT EXISTS yarn (
id int(11) NOT NULL AUTO_INCREMENT,
email varchar(50),
authId varchar(30),
color varchar(20),
weight varchar(20),
brand varchar(50),
amount varchar(20),
notes varchar(200),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Tools Table:
CREATE TABLE IF NOT EXISTS tools (
id int(11) NOT NULL AUTO_INCREMENT,
email varchar(50),
authId varchar(30),
craft varchar(20),
tool varchar(20),
size varchar(20),
material varchar(20),
notes varchar(200),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Updates Table:
CREATE TABLE IF NOT EXISTS updates (
id int(11) NOT NULL AUTO_INCREMENT,
date date NOT NULL,
notes varchar(30),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- When inserting into the updates table, be sure to format date as follows:
INSERT INTO updates (date, notes) VALUES ('2017-01-17', 'Here is an example where the date can be entered manually (must be a string)');
INSERT INTO updates (date, notes) VALUES (CURDATE(), 'Here is another example that will insert the current date.')
From root directory
$ node server.js
See CONTRIBUTING.md for contribution guidelines.
For development, in your browser, navigate to
http://localhost:8080