feat(Docs): Development docs

fix-mobile-margin
Stephen Burgess 6 years ago
parent 1f15a10b9d
commit 4cfa0060ea

@ -53,18 +53,37 @@ The first time you run this, you can run setup. After that, every time you pull
diesel setup --database-url='postgres://localhost/plume'
diesel migration run --database-url='postgres://localhost/plume'
```
#### Configuration
Now Plume should be running on your machine at [http://localhost:8000](http://localhost:8000). The first time you run the application, you'll want to configure your blog name on the [http://localhost:8000/configuration](http://localhost:8000/configuration) page. You'll be able to change this name later.
#### Running Plume
To run Plume locally, make sure you are once again in the Plume directory, such as `~/dev/Plume`. Now you will be able to run the application using the command
```
cargo run
```
#### Configuration
Now Plume should be running on your machine at [http://localhost:8000](http://localhost:8000). The first time you run the application, you'll want to configure your blog name on the [http://localhost:8000/configuration](http://localhost:8000/configuration) page. You'll be able to change this name later.
#### Testing the federation
To test the federation, you'll need to setup another database (see "Setup the database"),
also owned by the "plume" user, but with a different name. Then, you'll need to run the
migrations for this database too.
```
diesel migration run --database-url postgres://plume:plume@localhost/my_other_plume_db
```
To run this other instance, you'll need to give two environment variables:
- `ROCKET_PORT`, the port on which your app will run
- `DB_NAME`, the name of the database you just created
```
ROCKET_PORT=3033 DB_NAME=my_other_plume_db cargo run
```
#### Making a Pull Request
To create an upstream fork of the repository in GitHub, click "Fork" in the top right button on the main page of the [Plume repository](https://github.com/Plume-org/Plume). Now, in the command line, set another remote for the repository by running the following command, replacing `myname` with the name under which you forked the repo. You can use another name besides `upstream` if you prefer
To create an upstream fork of the repository in GitHub, click "Fork" in the top right button on the main page of the [Plume repository](https://github.com/Plume-org/Plume). Now, in the command line, set another remote for the repository by running the following command, replacing `myname` with the name under which you forked the repo. You can use another name besides `upstream` if you prefer. Using [SSH](https://help.github.com/articles/connecting-to-github-with-ssh/) is recommended.
```
git remote add upstream https://github.com/myname/Plume.git
git remote add upstream git@github.com/myname/Plume.git
# Alt # git remote add upstream https://github.com/myname/Plume.git
```
Now, make any changes to the code you want. After committing your changes, push to the upstream fork. Once your changes are made, visit the GitHub page for your fork and select "Make Pull Request". Add descriptive text, any issue numbers using hashtags to reference the issue number, screenshots of your changes if relevant, a description of how you tested your changes, and any other information that will help the project maintainers be able to quickly accept your pull requests.
The project maintainers may suggestion further changes to improve the pull request even more. After implementing this locally, you can push to your upstream fork again and the changes will immediately show up in the pull request after pushing. Once all the suggested changes are made, the pull request may be accepted. Thanks for contributing.
Now, make any changes to the code you want. After committing your changes, push to the upstream fork. Once your changes are made, visit the GitHub page for your fork and select "New pull request". Add descriptive text, any issue numbers using hashtags to reference the issue number, screenshots of your changes if relevant, a description of how you tested your changes, and any other information that will help the project maintainers be able to quickly accept your pull requests.
The project maintainers may suggest further changes to improve the pull request even more. After implementing this locally, you can push to your upstream fork again and the changes will immediately show up in the pull request after pushing. Once all the suggested changes are made, the pull request may be accepted. Thanks for contributing.

@ -3,63 +3,4 @@
Federated blogging engine, based on ActivityPub.
[**Demo instance**](https://baptiste.gelez.xyz/)
## Setup the database
You'll need Postgres.
```
sudo su postgres
psql
CREATE DATABASE plume;
CREATE USER plume WITH PASSWORD 'plume';
GRANT ALL PRIVILEGES ON DATABASE plume to plume;
\q
exit
```
Then run the migrations
```
diesel migrations run # Install diesel with `cargo install diesel_cli` if needed
```
You should repeat this operation every time the database schema has been modified.
A good practice is to run it after every `git pull`.
## Starting the app
Just use:
```
cargo run
```
You'll need Rust nightly.
Once the app started, try to visit [localhost:8000](http://localhost:8000).
To configure the instance (needed before you can do anything else),
go on [/configure](http://localhost:8000/configure).
## Testing the federation
To test the federation, you'll need to setup another database (see "Setup the database"),
also owned by the "plume" user, but with a different name. Then, you'll need to run the
migrations for this database too.
```
diesel migration run --database-url postgres://plume:plume@localhost/my_other_plume_db
```
To run this other instance, you'll need to give two environment variables:
- `ROCKET_PORT`, the port on which your app will run
- `DB_NAME`, the name of the database you just created
```
ROCKET_PORT=3033 DB_NAME=my_other_plume_db cargo run
```
[Development Guide](https://github.com/Plume-org/Plume/blob/master/DEVELOPMENT.md)

Loading…
Cancel
Save