Giter VIP home page Giter VIP logo

myblog's Introduction

About

This is my personal blog.

Architecture

img

Status

  • The third-party login function of Github is in disrepair for a long time, and the api seems to be deprecated, and there is no time to rewrite it for the time being
  • js uses a very old technology (I'm not familiar with the front-end technology)

Dependences

  • Redis
  • Postgresql

Getting Started

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

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

$ cargo install sqlx-cli

Use docker images

Install from docker-hub

$ docker pull postgres
$ docker run --name your_container_name -e POSTGRES_PASSWORD=system -d -p 5432:5432 postgres

If you want to enter psql interactive command line

$ docker run -it --rm --link your_container_name:postgres postgres psql -h postgres -U postgres

init database

$ sqlx database create
$ sqlx migrate run

Use docker images

$ docker pull redis
$ docker run --name redis -p 6379:6379 -d redis

nginx is only used when deploying production

config:
server {
        listen       80;
        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: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;
        }

blog

$ cargo run --release // listen on 127.0.0.1:8080

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.