Skip to content

Database Support Scripts

These are scripts that helps in the development whenever data is involved and needs to be filled in the database.

This can be found under server/support/*

How to use?

Connect to the docker container

Connect to the docker container by typing this command

1
docker exec -it indeaa_server bash
What does this command do?

This executes a bash script in the docker container that can receive commands

Execute Script

When you are inside the docker container, use the scripts by the following command

1
node support/[scriptName]

eg.

1
node support/insertSampleCourses.js
support/index.js

This file will execute all the sample scripts. For ease of use of setup for development.

1
node support/index.js

Adding more scripts

  1. Create your own script
  2. Import the script to index.js by adding this line
1
_ = require("./SCRIPTNAME")