Coder Social home page Coder Social logo

ptzagk / myblog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from driftluo/myblog

0.0 0.0 0.0 2.95 MB

A personal blog written by Rust, using sapper and diesel

Home Page: https://www.driftluo.com

License: MIT License

Lua 0.10% PLpgSQL 0.90% Rust 49.49% CSS 5.11% JavaScript 18.61% HTML 25.79%

myblog's Introduction

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

myblog's People

Contributors

driftluo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.