Skip to content

Commit

Permalink
update to server.js added /login
Browse files Browse the repository at this point in the history
  • Loading branch information
EngineerShawn committed Nov 18, 2023
1 parent ecbb69d commit aa43aa6
Show file tree
Hide file tree
Showing 3 changed files with 262 additions and 1 deletion.
258 changes: 258 additions & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"axios": "^1.6.2",
"discord.js": "^14.14.1",
"express": "^4.18.2",
"path": "^0.12.7",
"pg": "^8.11.3",
Expand Down
4 changes: 3 additions & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const express = require('express');
const axios = require('axios');
const { Pool } = require('pg');
const winston = require('winston');
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
require('dotenv').config({path: '../.env'});

// Logging Setup
Expand Down Expand Up @@ -154,7 +156,7 @@ app.get('/', (request, response) => {

});

app.listen(port, () => console.log(`NovaAI is listening on http://localhost:${port}`));
app.listen(port, () => logger.info(`Server is running on port ${port}`));

client.once('ready', () => {
console.log('NovaAI is Online!');
Expand Down

0 comments on commit aa43aa6

Please sign in to comment.