Giter Club home page Giter Club logo

blog's Introduction

About

This is my personal blog, and its also my first Rust project.

Why Rust

Well, I know there are a lot of alternatives to writing a blog, but I find other languages such as Java, Python, Javascript,Php, are not fancy enough ;-) Kidding, the truth is that I have learned Rust for more that a half years, but I still could not build real some stuff on Rust. Yes, I lack of idea or I not am skillful enough to fulfill my thought. Finally, I decided to rewrite my blog which was built on Github Page and Org-mode.

Getting Started

Requirement

Rust

Install Rust via shell script

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

After installing, you might need to

source $HOME/.cargo/bin

Because this project is built on Rocket, and Rocket depends on Rust nightly, so you need change Rust environment to nightly

rustup default nightly

Diesel Cli

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

Postgresql

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

Init database

After everything is done, it is time to create table in database for this project, just run

diesel migration run

Launch Rocket

Everything is ok, now, launch Rocket:

cargo run

And open your favourite browser, enter localhost:8000

If you want to login admin page, you could enter localhost:8000/admin/login Email: [email protected] Password: 123456

Screenshot

Index Page

./images/index.png

About Page

./images/about.png

Dashboard Page

./images/admin_index.png

Post List Page

./images/admin.png

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.