Skip to content

Restructure Project and Small Fixes #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ Backend: <a href="https://actix.rs/"><img src="https://cdn.discordapp.com/attach
### Steps

1. `git clone https://github.com/Domterion/zer0bin && cd zer0bin`
2. `cp config.example.json config.json` and edit as appropriate
3. `cp example.nginx /etc/nginx/sites-avaliable/yoursite.tld`, edit as appropriate, `sudo cp /etc/nginx/sites-avaliable/yoursite.tld /etc/nginx/sites-enabled/yoursite.tld && systemctl nginx restart`
4. `psql -d postgres`
5. `CREATE DATABSE zer0bin;` and `\c zer0bin`
6. Paste contents of `schema.sql` and `\q`
7. `cd frontend`
8. `cp config.example.json config.json` and edit as appropriate
9. `yarn && yarn run build`
10. `cd ../backend && cargo build --release`
11. `./target/release/backend` (preferably in a tmux session)
2. `cp example.nginx /etc/nginx/sites-avaliable/yoursite.tld`, edit as appropriate, `sudo cp /etc/nginx/sites-avaliable/yoursite.tld /etc/nginx/sites-enabled/yoursite.tld && systemctl nginx restart`
3. `psql -d postgres`
4. `CREATE DATABSE zer0bin;` and `\c zer0bin`
5. Paste contents of `db/schema.sql` and `\q`
6. `cd frontend`
7. `cp config.example.json config.json` and edit as appropriate
8. `yarn && yarn run build`
9. `cd ../backend`
10. `cp config.example.json config.json` and edit as appropriate
11. `cargo build --release`
12. `./target/release/backend` (preferably in a tmux session)

### Configuration

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async fn new_paste(state: web::Data<AppState>, data: web::Json<PartialPaste>) ->

#[actix_rt::main]
async fn main() -> io::Result<()> {
let config = config::load(PathBuf::from("../config.json"));
let config = config::load(PathBuf::from("config.json"));
let pool = PgPoolOptions::new()
.max_connections(100)
.connect(&config.databases.postgres_uri)
Expand Down
File renamed without changes.