Node
-->v18.12.1
or laterPostgres
-->v3.3.5
or later
After cloning the repository, run the following:
npm install
After installing all dependencies, next step is creating .env
file for credentials
cp .env-example .env
npm build
NOTE: In order to get access to create new room you should be an admin. To insert admin's credentials, run following script:
npm run db:seed
During creation of rooms request
should be sent with Beaerer {yourToken}
auth token
npm start
npm run start:dev
Please, check the logs, if the [DataSource]
gives an error while initializing, open the config.ts
file in utils
folder and update the following with hard coded which fits you:
getDataSourceConfig(): DataSourceOptions {
return {
type: 'postgres' as any,
host: process.env['DB_HOST'],
port: parseInt(process.env['DB_PORT']),
username: process.env['DB_USERNAME'],
password: process.env['DB_PASSWORD'],
database: process.env['DB_DATABASE'] || 'impactt',
entities: [join(__dirname, `../**/entities/**.entity.{ts,js}`)],
synchronize: true
};
}
npm run db:seed
command superAdmin will be created .
{
"username": "superAdmin",
"password": "123456789"
}
npm run test:e2e