Skip to content

DAT2G7/grid-server

Repository files navigation

example event parameter example event parameter

grid-server

This repository contains the grid-server code accompanying AAU cs-23-DAT-2-07's P2 report

This server is responsible for delegating registered tasks to clients, as well as serving the client code to clients.

Setup

Clone repository

git clone https://github.com/DAT2G7/grid-server

Install dependencies

npm install

Build project

npm run build

Start builded project

npm run start

While developing, the project can be run in watch mode, automatically re-compiling after changes. This is done with the watch command:

npm run watch

Configuration is done with .env files. A .env.example file has been supplied.

SRC structure

The source code is loosely structured on the MVC Pattern. The src folder contains the following folders:

Folder Description
controllers Logic for individual endpoints. These are set up independent from routing and validation for ease of development
middleware Middleware functions used for validation in routing
models Controller models fx used for interacting with the database
public All files served to the client. Further split into static content and pug files used in rendering views
services The underlying generic classes used in creating the database
routes Routing logic for the server independent of controllers. Sets up middleware for validation
test Setup for facilitating extended testing
types Typescript types bundled into groups describing their purpose
utils Utility functions used throughout the project

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages