README.md (2243B)
- # Mastodon / mastofe repository
- [![pipeline status](https://git.pleroma.social/tyge/mastofe/badges/master/pipeline.svg)](https://git.pleroma.social/tyge/mastofe/commits/master)
- This is a fork of the Mastodon repository. It was mostly created to develop the
- few changes needed to make the Mastodon Frontend, which is bundled in Pleroma
- and can be accessed by going on `/web`.
- # Development
- I've made a few modifications to the build scripts to avoid having to install
- a single ruby gem - or ruby itself, for that matter. All you will need is
- nodejs, yarn, nginx and the pleroma backend.
- ## Install yarn
- Yarn will be needed to set up the mastodon frontend for development. Check out
- https://yarnpkg.com/lang/en/docs/install/ . For Debian, it's like this:
- ```sh
- # import yarn pub key and repo
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update
- sudo apt-get install yarn
- ```
- ## Mastodon Frontend Setup
- ```sh
- # Install dependencies
- yarn install -D
- npm run dev
- # check that http://localhost:3035/packs/common.css works in your browser once
- # webpack is done compiling. if css shows up, then it should have worked!
- ```
- ## nginx setup
- I'll assume that you have already fired up pleroma using the installation guide.
- To work on the frontend while still having the backend up, use this nginx
- config.
- ```
- server {
- listen 80;
- server_name 127.0.0.6;
- location /packs {
- add_header 'Access-Control-Allow-Origin' '*';
- proxy_http_version 1.1;
- proxy_set_header Host $http_host;
- proxy_pass http://localhost:3035;
- }
- location / {
- add_header 'Access-Control-Allow-Origin' '*';
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $http_host;
- proxy_pass http://localhost:4000;
- }
- }
- ```
- I recommend you leave the server name on a loopback address so that your browser
- won't complain about using HTTP. In any case, once you have everything set up,
- going to `/web` should show you the frontend and should work with hot reloading.
- Have fun!