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.

92 lines
2.4 KiB

7 years ago
6 years ago
  1. # NodeJSBlog
  2. This is a project I did to recreate my word press blog using plane node js. If I were to
  3. do this again, I would use PHP. NodeJS is great, however, it was a pain to deal
  4. with all the asynchronous calls when trying to create a web page in a linear fashion.
  5. If you want to run this project, it requires Mysql, npm, and node to be installed. For
  6. deployment I used a [Nginx](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04)
  7. proxy.
  8. ## Color scheme
  9. [Adobe Color Wheel](https://color.adobe.com/create/color-wheel/?copy=true&base=2&rule=Custom&selected=3&name=Copy%20of%20Site&mode=rgb&rgbvalues=0.231,0.325499999999957,0.42,0,0.7450980392156863,0.6980392156862745,0.10196078431372549,0.36470588235294116,0.38823529411764707,0.8235294117647058,0.7529411764705882,1,0.3165071770335184,0.24148325358851674,0.49&swatchOrder=0,1,2,3,4)
  10. Blue:
  11. - Primary: #3B536B
  12. - Secondary: #00BEB2
  13. Purple:
  14. - Primary: #513E7D
  15. - Secondary: #D2C0FF
  16. 006688
  17. ## MYSQL Information
  18. ![](blogSql.svg)
  19. ```SQL
  20. create database jrtechs_blog;
  21. use jrtechs_blog;
  22. create table users(
  23. user_id mediumint unsigned not null AUTO_INCREMENT,
  24. user_name varchar(60) not null,
  25. password char(64) not null,
  26. salt char(64) not null,
  27. primary key(user_id)
  28. );
  29. create table categories(
  30. category_id mediumint unsigned not null AUTO_INCREMENT,
  31. name varchar(60) not null,
  32. url varchar(60) not null,
  33. primary key(category_id)
  34. );
  35. create table posts(
  36. post_id mediumint unsigned not null AUTO_INCREMENT,
  37. category_id mediumint unsigned not null,
  38. picture_url varchar(100) not null,
  39. published datetime not null,
  40. name varchar(100) not null,
  41. url varchar(100) not null,
  42. primary key(post_id)
  43. );
  44. // not used yet
  45. create table downloads(
  46. download_id mediumint unsigned not null AUTO_INCREMENT,
  47. file varchar(40) not null,
  48. name varchar(20) not null,
  49. download_count mediumint unsigned null,
  50. primary key(download_id)
  51. );
  52. create table popular_posts(
  53. popular_post_id mediumint unsigned not null AUTO_INCREMENT,
  54. post_id mediumint unsigned not null,
  55. primary key(popular_post_id)
  56. );
  57. grant all on jrtechs_blog.* to blog_user@localhost identified by "password";
  58. ```
  59. ## Node Dependencies
  60. ```bash
  61. npm install express
  62. npm install express-session
  63. npm install mysql
  64. npm install sanitizer
  65. npm install promise
  66. npm install highlight
  67. npm install crypto
  68. npm install express-force-ssl
  69. npm install remarkable
  70. ```