Skip to content

Installing the Corelink Server

IN PROGRESS

IN PROGRESS

IN PROGRESS

Required Software

  • Git
  • NodeJS 16 (please install the current version and enable compilation support)
  • Python (required by NPM)

Clone the repository and go into repository folder

git clone https://dev.hpc.nyu.edu/corelink/corelink-server.git
cd corelink-server

Install dependencies and fix potential bugs

npm install
npm audit fix

Enable config file for the database

Linux/Mac:

cd config/
cp knexfile.js.sample knexfile.js

Windows:

cd config\
copy knexfile.js.sample knexfile.js

Create database with latest tables

cd config
node ../node_modules/knex/bin/cli.js migrate:latest

Seed database with basic data

Warning: All existing data inside the database will be deleted.

cd config
node ../node_modules/knex/bin/cli.js seed:run

Start server

node corelink.js

Test sending and receiving packages

After starting the server the sender and receiver scripts can be used to test the server. These are in the corelink-tools repository. In separate terminals next to the server start both applications.

First start the sender:

cd sender
node senderUDP-lib.js
When the sender starts the first time it will ask for the IP address to connect to the server. In this example use 127.0.0.1, then press enter twice to use the preset username and password.

Then start the listener:

cd listener
node listenerUDP-lib.js
It should not ask for the IP adresses again. Just press enter twice to start the appliaction.

Pull latest version

cd corelink-server
git pull

Update database to latest table version

cd config
node ../node_modules/knex/bin/cli.js migrate:latest

simply run from within networktest

Warning: All existing data inside the database will be deleted.

npm run devinstall

you can also use separate commands to do the migrations: run the rollback until you are at the beginning of the migrations

Warning: All existing data inside the database will be deleted.

cd config
node ../node_modules/knex/bin/cli.js migrate:rollback

then migrate and seed

Warning: All existing data inside the database will be deleted.

cd config
node ../node_modules/knex/bin/cli.js migrate:latest
node ../node_modules/knex/bin/cli.js seed:run
```