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.

57 lines
1.2 KiB

7 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. picture_url varchar(100) not null,
  27. published datetime not null,
  28. name varchar(100) not null,
  29. url varchar(100) not null,
  30. primary key(post_id)
  31. );
  32. create table popular_posts(
  33. popular_post_id mediumint unsigned not null AUTO_INCREMENT,
  34. post_id mediumint unsigned not null,
  35. primary key(popular_post_id)
  36. );
  37. grant all on blog_name.* to blog_user@localhost identified by "password";
  38. ```
  39. ## Node Dependencies
  40. ```bash
  41. npm install mysql
  42. npm install sanitizer
  43. npm install promise
  44. npm install markdown
  45. npm install markdown-to-html -g
  46. npm install highlight
  47. ```