Ombi Development¶
Frontend¶
In this example I'll be using VS Code to edit the frontend.
- Clone the Repository
- Change to the relevant branch (currently
development
) - Install the .Net Core SDK (latest) https://dotnet.microsoft.com/download/dotnet-core
- Install NodeJS and Tools for Node.js Native Modules
- Install Yarn
- Set the Env variable to development
$export ASPNETCORE_Environment=Development
or$env:ASPNETCORE_ENVIRONMENT = "Development"
in Powershell - Open up a New Terminal in the following location:
~src/Ombi/ClientApp
, run the following: yarn
(wait for it to install all dependencies)yarn start
- Go to
~/src/Ombi
in a Terminal Window and rundotnet run -- --host http://*:5000
- Navigate to http://localhost:5000/
You can now make UI changes and it will use Hot Module Reloading to show the changes.
If you are doing this on your server machine changing the environment will make your Ombi install fail to run.
Be sure to change the environment back to production
to re-run Ombi.
Backend¶
To edit the backend of Ombi, you'll need to use Visual Studio.
- Clone the Repository.
- Change to the relevant branch (currently
development
). - Install the .Net Core SDK (latest) https://dotnet.microsoft.com/download/dotnet-core.
- Install NodeJS and Tools for Node.js Native Modules.
- Install Yarn.
- Install Visual Studio (we suggest Community Edition, set up for C#).
- Open the
Ombi.sln
file in the~\src
folder. - Make the changes you want made/think are needed.
- We suggest saving changes to either a new branch (if you have access), or making a fork of the repo for your edits to be kept in.
- Save often, and commit changes using the git option regularly (with logical commit messages). This helps you revert changes if you break something (and yes, we do it too).
- When ready to test the changes, set the Env variable to development
$export ASPNETCORE_Environment=Development
or$env:ASPNETCORE_ENVIRONMENT = "Development"
in Powershell. - Open up a New Terminal in the following location:
~src/Ombi/ClientApp
, run the following: yarn
(wait for it to install all dependencies).yarn start
.- Go to
~/src/Ombi
in a Terminal Window and rundotnet run -- --host http://*:5000
. - Navigate to http://localhost:5000/.
If Ombi compiles and runs successfully with your changes, you'll be able to load the web UI on the link above.
If Ombi fails to compile, the error will appear in the terminal window you ran the dotnet run...
command in - that's the compilation command. Generally speaking, it'll give you an error message with details as to why it didn't work.
Submitting Changes¶
Any changes you make to the code should be pushed up to the branch you made for working on.
Once you are happy with your changes, submit a Pull Request to the Ombi repository for review.