Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

6 years ago
  1. # NodeJSBlog
  2. Recreating my wordpress blog in node JS.
  3. ## MYSQL Information
  4. ```SQL
  5. create database blog_name;
  6. use blog_name;
  7. create table users(
  8. user_id mediumint unsigned not null AUTO_INCREMENT,
  9. first_name varchar(20) not null,
  10. last_name varchar(40) not null,
  11. user_name varchar(60) not null,
  12. pass char(40) not null,
  13. registration_date datetime not null,
  14. admin boolean not null,
  15. primary key(user_id)
  16. );
  17. create table categories(
  18. category_id mediumint unsigned not null AUTO_INCREMENT,
  19. name varchar(60) not null,
  20. url varchar(60) not null,
  21. primary key(category_id)
  22. );
  23. create table posts(
  24. post_id mediumint unsigned not null AUTO_INCREMENT,
  25. category_id mediumint unsigned not null,
  26. user_id mediumint unsigned not null,
  27. picture_url varchar(100) not null,
  28. published datetime not null,
  29. url varchar(100) not null,
  30. name varchar(100) not null,
  31. primary key(post_id)
  32. );
  33. create table popular_posts(
  34. popular_post_id mediumint unsigned not null AUTO_INCREMENT,
  35. post_id mediumint unsigned not null,
  36. primary key(popular_post_id)
  37. );
  38. grant all on blog_name.* to blog_user@localhost identified by "password";
  39. ```
  40. ## Node Dependencies
  41. ```bash
  42. npm install mysql
  43. npm install sanitizer
  44. npm install promise
  45. ```