Giter VIP home page Giter VIP logo

zzy / actix-graphql-react Goto Github PK

View Code? Open in Web Editor NEW
26.0 4.0 5.0 2.97 MB

Clean boilerplate for GraphQL server & react-app built with Rust & TypeScript. Backend: actix-web + juniper(GraphQL server) + diesel(ORM); Frontend: react + apollo(GraphQL client).

Home Page: https://blog.budshome.com

License: Apache License 2.0

Rust 100.00%
rust-graphql-server actix-web juniper diesel postgresql typescript-react apollo-graphql-client mysql

actix-graphql-react's Introduction

actix-graphql-react

NOT complete - Clean boilerplate for GraphQL server & react-app built with Rust & TypeScript.

Features

  • DB migration with Diesel
  • User: query & mutation
  • Project: query & mutation
  • User register
  • Sign up & Sign in
  • Encrypt password & Change password
  • Profile Update
  • JSON web token authentication

Stacks

Backend

Frontend

How to run?

Backend

git clone https://github.com/zzy/actix-graphql-react.git
cd actix-graphql-react/backend/

Put the DATABASE_URL & port in a .env file.

Configure the database backend in Cargo.toml:

[dependencies]
diesel = { version = "<version>", features = ["<postgres|mysql>"] }

Then, run at the bash:

cargo install diesel_cli --no-default-features --features <postgres|mysql>
echo DATABASE_URL=<postgres|mysql>://username:password@localhost/actix_graphql > .env
echo GRAPHQL_PORT=5000 >> .env

Build & Release

  • Build
diesel setup
diesel migration run
cargo build
cargo run
  • Release
cargo build --release
cd target/release
./actix-graphql-react

GraphiQL: connect to http://localhost:5000/gql with browser.

Frontend

git clone https://github.com/zzy/actix-graphql-react.git
cd actix-graphql-react/frontend/
# npm or yarn
<npm|yarn> install
<npm|yarn> start

Then go to http://localhost:5001

actix-graphql-react's People

Contributors

dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.