Skip to content

PluginSystem-StudyManager/Server

Repository files navigation

StudyTool Server

The Web-application for the StudyTool.

Features

  • API for plugins
    • upload
    • download
    • info
  • homepage
  • account system
    • login
    • register
  • profile
    • show plugins
    • show user data
  • marketplace
    • show all plugins
    • search plugin
  • download application page
  • dev guide

Installation

For developers

Prerequisites

Install everything

  • clone this repo
git clone https://github.com/PluginSystem-StudyManager/Server.git
cd Server
  • install all needed node packages
# WORKDIR: Server
npm install
  • install all needed go modules
# WORKDIR: Server/src
go get -d ./...

Start the server

  • compile all 'sass' and 'ts' files

This also watches for changes and automatically compiles these files.

# WORKDIR: Server
npm run grunt
  • generate go code

Some go code is generated by tools. This code is not added to version control. You only need to execute this the first time or when you made changes to a .jade or .schema.json file.

# WORKDIR: Server/src
go generate
  • compile go code
# WORKDIR: Server/src
go install ./...
  • Start the server
server

Troubleshooting

Run on a Server

Prerequisites

You need a linux based os for this to work.

Single script setup

If you are on a debian based distro you can use this one liner to set up everything and start the server.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/PluginSystem-StudyManager/Server/dev/scripts/install.sh)"

Manual setup

You can also do the steps from the above script manually:

  • Clone repo
git clone https://github.com/PluginSystem-StudyManager/Server.git
cd Server

You can use the install_docker script if you are on a debian based distro.

  • build + start the server

You may have to run this as sudo.

For more information about docker-compose see: https://docs.docker.com/compose/reference/overview/

# WORKDIR: Server
docker-compose up