https://github.com/phrohdoh/rust-and-polymer
Example project using Polymer on the frontend with a diesel-rocket powered backend
https://github.com/phrohdoh/rust-and-polymer
diesel polymer rocket rust rust-diesel rust-rocket sqlite
Last synced: 2 months ago
JSON representation
Example project using Polymer on the frontend with a diesel-rocket powered backend
- Host: GitHub
- URL: https://github.com/phrohdoh/rust-and-polymer
- Owner: phrohdoh
- License: mit
- Created: 2017-02-14T02:33:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-14T17:47:47.000Z (over 9 years ago)
- Last Synced: 2025-03-22T06:26:44.847Z (over 1 year ago)
- Topics: diesel, polymer, rocket, rust, rust-diesel, rust-rocket, sqlite
- Language: HTML
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polyrust
Combining [Polymer](http://polymer-project.org/) and [Rust](http://rust-lang.org/) (via [Rocket](https://rocket.rs/) and [Diesel](http://diesel.rs))
### Setup
```
# from the project root
$ ./setup.bash
```
Then add at least a single payee and transaction to the sqlite3 `.db` file created at `./backend/test.db`.
### Running the backend
```
# from the project root
$ cd backend ; cargo run
```
### Running the frontend
```
# from the project root
$ cd frontend ; polymer serve
```
### Viewing the UI
You will need to run your browser with CORS disabled until I properly respond to CORS requests.
I do this on macOS with this function in my shell:
```bash
google-chrome-no-cors() {
open -a "Google Chrome" --args --disable-web-security --user-data-dir
}
```
To use this open a bash instance and run:
```
$ google-chrome-no-cors
```
Which will launch Google Chrome in an insecure mode so I don't have to muck with CORS yet.
Now you can play around with the frontend by navigating to `localhost:8080` (or whichever port `polymer serve` picks).