Skip to content

hackerchai/SapperBlog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is my personal blog.

Architecture

img

Dependences

  • Redis
  • Postgresql

Getting Started

$ curl https://sh.rustup.rs -sSf | sh

This project use Diesel as Orm framework, so you need to install its command line tool via Rust package manager(eg, Cargo)

$ cargo install diesel_cli --no-default-features --features postgres

you need to install Postgresql database, and then configure postgresql by following document’s guide

Install the corresponding version of contrib

$ yum install postgresql96-contrib

init database

$ diesel migration run

nginx has been used in the development of the time

config:
server {
        listen       8880;
        server_name  127.0.0.1;

        location / {
            proxy_pass http://127.0.0.1:8080;
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        location /api/v1/ {
            proxy_pass http://127.0.0.1:8888/;
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

blog

$ cargo run --bin blog_web // listen on 127.0.0.1:8080

$ cargo run --bin blog_api // listen on 127.0.0.1:8888

if you want to login admin, the account is admin, password is admin

About

A personal blog written by Rust, using sapper and diesel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 48.8%
  • HTML 25.6%
  • JavaScript 18.5%
  • CSS 5.1%
  • TSQL 1.0%
  • PLpgSQL 0.9%
  • Lua 0.1%