8月18日(周六)成都源创会火热报名中,四位一线行业大牛与你面对面,探讨区块链技术热潮下的冷思考。
Watch Star Fork

OUISRC / Rust-webapp-starterRustApache-2.0

加入码云
与超过 300 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
使用 Rust 的 Actix-web 框架和 Vuejs 开发的 SPA
Loading...
README.md 1.57 KB

Rust-webapp-starter

Rust single page webapp written in actix-web with vuejs.

  • Async stable Actix-web framework
  • diesel, postgresql r2d2
  • SPA CORS JWT
  • Vuejs Parcel-bundler

How To

first create a name 'webapp' postgresql database for this project.

with docker

docker-compose up -d

when development

$ git clone https://github.com/OUISRC/Rust-webapp-starter.git
$ cd Rust-webapp-starter
$ cargo install diesel_cli --no-default-features --features postgres
$ diesel setup
$ cargo run

// another shell  nodejs(v8.9.4 on my machine)

$ cd Rust-webapp-starter/webapp
$ npm install
$ npm run dev

then open browser 'http://localhost:1234/'

when production

current thereis a bug with actix-web, so before do, you should comment one line(https://github.com/OUISRC/Rust-webapp-starter/blob/master/src/utils/cors.rs#L6)

$ git clone https://github.com/OUISRC/Rust-webapp-starter.git
$ cd Rust-webapp-starter
$ cargo install diesel_cli --no-default-features --features postgres
$ diesel setup
$ cd webapp
$ npm install
$ npm run build
$ cd ..
$ cargo run

then open broswer 'http://localhost:8000/'

worked

  • signup (done)
  • signin (done)
  • browse pages data : get/post (done)
  • publish article (done)
  • user center : jwt (done)
  • do CRUD (done)
Home

Contribute

welcome to contribute !

License

LICENSE-APACHE.

项目点评 ( 0 )

你可以在登录后,发表评论