Skip to content

mcirikovic/schulcloud-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8,688 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schul-Cloud Server

Based on Node.js and Feathers

Dev: Build Status Master: Build Status

Dev: codecov Master: codecov

Codacy: Codacy Badge Codacy Badge

Version Greenkeeper badge

Swagger UI documentation is available here. When running the server locally, it is served at http://localhost:3030/docs/.

Requirements

  • Node.js (see .nvmrc for version)
  • MongoDB (4.x)

Setup

You will need the client as well. For more detailed setup instructions, take a look here. It is written for Windows but the procedure is similar for other OS.

Run

  1. Go into project folder
  2. Run mongod
  3. Run npm start
  4. Run npm run setup

Debugger Configuration in Visual Studio Code

For more details how to set up Visual Studio Code, read this document.

How to name your branch and create a pull request (PR)

  1. Take the Ticket Number from JIRA (ticketsystem.schul-cloud.org), e.g. SC-999
  2. Name the feature branch beginning with Ticket Number, all words separated by dash "-", e.g. feature/SC-999-fantasy-problem
  3. Create a PR on branch develop containing the Ticket Number in PR title
  4. Keep the WIP label as long as this PR is in development, complete PR checklist (is automatically added), keep or increase code test coverage, and pass all tests before you remove the WIP label. Reviewers will be added automatically. For more information check our Definition of Done here.

Testing

Run tests

  1. Go into project folder
  2. run npm run test

To run a single test, use npm run mocha-single -- <path/to/unit.test.js>.

Create tests

  1. Create a folder for the "service" you're working on in "/test/services"
  2. Create a file "user.test.js" for frontend tests (e.g. clicking a link or check if URL is available)
  3. Create a file "unit.test.js" for backend tests (e.g. calculating a number)

Try to cover as many methods as possible unit test wise - goal is 100% of course, so one test per method.

Committing

Default branch: develop

  1. Go into project folder
  2. Checkout to develop branch (or clone for the first time)
  3. Run git pull
  4. Create a branch for your new feature named feature/SC-Ticket-ID-Description
  5. Run the tests (see above)
  6. Commit with a meaningful commit message(!) even at 4 a.m. and not stuff like "dfsdfsf"
  7. Start a pull request (see above) to branch develop to merge your changes

About

HPI Schul-Cloud Core Server

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 98.7%
  • Other 1.3%