Before proceeding, cd into the /src directory
run npm install
Create src/database/dbConfig.js with the following content:
module.exports = {
user: "your-username-here",
password: "your-password-here",
server: "localhost",
database: "database-name-here",
trustServerCertificate: true,
options: {
port: 1433,
connectionTimeout: 60000,
requestTimeout: 300000,
encrypt: false
},
}You can change the content of the file to match your settings or set up the sql server to match its content
Create src/.env with the following content:
ACCESS_TOKEN_SECRET=any-string-hererun npm run seed
You can also rerun this command to reset the database to its seeded form
The sql to seed the database can be found in src/database/seedScript.js
npm start (for nodemon)
or
node app.js