DevHive is the social network solution for programmers. In it you can make posts to share with your friends, comment and more.
This is the back-end portion of the project, built with ASP.NET Core
. For the front-end, refer to DevHive-Angular.
In the docs
folder you can find relevenat information and documentation about this project. You can also find our Privacy Policy.
There currently aren't any demo instances, so the only way to try it out for yourself it to set it up locally, on a computer or server. In this section are explained the steps to do so.
The steps are oriented around Linux-based systems.
There are some tools you need to setup before even downloading the app:
dotnet 5.0
or laterEntity Framework Core tool 5.0.2
or greater- if you've already installed
dotnet
, you can just run this commanddotnet tool install dotnet-ef -g
- if you've already installed
postresql 13.1
or greater (older versions might work, but haven't been tested)
After installing all of the tools and setting up the database, you should have a user with a password with which to access postgres and you should have created a database for the API. If so, follow these steps:
- Clone the repository:
git clone https://github.com/Team-Kaleidoscope/DevHive.git
- Navigate to the folder, in which you cloned it, and then go to
src/Data/DevHive.Data
- Edit the file
ConnectionString.json
and replace the default values with what you've setup - In the same directory, run
dotnet ef database update
- Navigate to the
src/Web/DevHive.Web
folder - Edit the
appsettings.json
file, under "ConnectionStrings", type in the values, you setup inConnectionString.json
- On the third row there is a "signingKey" field, it's used for encryption of User passwords. It must be made up of 64 letters and number! On the next two rows you also need to set a "validationIssuer" and "audience", you can set these values to whatever you want.
- There are also some cloud values that you can change. Currently, the project uses Cloudinary as a place for uploading files. If you wish, you can setup your own account there, otherwise file uploading won't work.
- Run
dotnet run
- feel free to run the command in background or create a systemd service
If everything went well, you can now access the API on http://localhost:5000/api
with something like Postman or the FOSS alternative Insomnia Designer. On where to send requests, refer to the "API-Endpoints" page in docs.
You can change on what port the API is ran, by changing the HTTP_PORT
constant in src/Web/DevHive.Web/Program.cs
. If you do so, you must also update the front-end, because by default it will try to send requests to http://localhost:5000
.