Skip to content

Commit

Permalink
Remove unused files and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SDE-ADNAN committed Jan 5, 2024
1 parent 722755b commit 5694307
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 7 deletions.
9 changes: 9 additions & 0 deletions server/ENV/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PORT=3033
SECRET="secret-key"
MONGO_CONNECT_URL ="mongodb+srv://adnansdeofficial:[email protected]/?retryWrites=true&w=majority"
# NODEMAILER_EMAIL = "[email protected]";
NODEMAILER_EMAIL =[email protected]
# mac device
NODEMAILER_APP_SPECIFIC_PASS=pgfxhuctmkrfdjsr
# windows device
# NODEMAILER_APP_SPECIFIC_PASS="mfkqvxcdsiwjhiqk"
File renamed without changes.
File renamed without changes.
13 changes: 9 additions & 4 deletions app.ts → server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import cors from 'cors';
import mongoose from 'mongoose';
import session from 'express-session';
import os from 'os';
import path from 'path';

const networkInterfaces = os.networkInterfaces();
const hostAddresses: string[] = [];
Expand Down Expand Up @@ -43,9 +44,15 @@ app.use(upload.any()); // middleware to handle form-data
app.use('/jarvis/auth', authRoutes);
app.use('/jarvis/admin', adminRoutes);

app.use('/', (req, res, next) => {
res.send("<h1>Welcome to todo backend </h1>")
// app.use('/', (req, res, next) => {
// res.send("<h1>Welcome to todo backend </h1>")
// })

app.use(express.static("public"));
app.use("/*", (req, res) => {
res.sendFile(path.join(__dirname, "/public/index.html"))
})

mongoose
.connect(
process.env.MONGO_CONNECT_URL || ''
Expand All @@ -58,8 +65,6 @@ mongoose
console.log(err);
});

// var host = Object.values(require('os').networkInterfaces()).reduce((r:string, list) => r.concat(list.reduce((rr:string, i) => rr.concat(i.family === 'IPv4' && !i.internal && i.address || []), [])), [])

Object.values(networkInterfaces).forEach((interfaces) => {
if(interfaces)
interfaces.forEach((iface) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions dist/app.js → server/dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const cors_1 = __importDefault(require("cors"));
const mongoose_1 = __importDefault(require("mongoose"));
const express_session_1 = __importDefault(require("express-session"));
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
const networkInterfaces = os_1.default.networkInterfaces();
const hostAddresses = [];
// project imports
Expand All @@ -38,8 +39,12 @@ app.use(upload.any()); // middleware to handle form-data
// app.use(express.json())
app.use('/jarvis/auth', auth_1.default);
app.use('/jarvis/admin', admin_1.default);
app.use('/', (req, res, next) => {
res.send("<h1>Welcome to todo backend </h1>");
// app.use('/', (req, res, next) => {
// res.send("<h1>Welcome to todo backend </h1>")
// })
app.use(express_1.default.static("public"));
app.use("/*", (req, res) => {
res.sendFile(path_1.default.join(__dirname, "/public/index.html"));
});
mongoose_1.default
.connect(process.env.MONGO_CONNECT_URL || '')
Expand All @@ -50,7 +55,6 @@ mongoose_1.default
.catch(err => {
console.log(err);
});
// var host = Object.values(require('os').networkInterfaces()).reduce((r:string, list) => r.concat(list.reduce((rr:string, i) => rr.concat(i.family === 'IPv4' && !i.internal && i.address || []), [])), [])
Object.values(networkInterfaces).forEach((interfaces) => {
if (interfaces)
interfaces.forEach((iface) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions server/todo-backend-typescript.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAoQsEYgbvAJQRWDcuULCyKDIb5n58Vvjt349WPDv7x/mZKdIt
YqDeSv0gfMc/R5LrbmBZ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ZWLCr
m4j41zdilG8zMJf9f70O8GzvOTEwSCb32Bb5LeuKrHqRZCWiNo3TD/QKBef+Dzn/
oBtXaSvTuDGMzAaNl1Dt1gcCgYBL1ylDgeX9+jmfWaxEA/KMQ0h78JhHiwvywA4h
aCjzxz2oiOAaGHGMTvAKqQgL2WPKvym2lmvvlIV0YUjh2h69xmROPTXoLr8NApn+
VS6qKOm4VN8f84Q0qt7nYNjbe21TSVCn39tNAq6WlxD/gEofY0myoAEV5UVO2+DR
00UoDwKBgAqefVxcsN6Ku5XnRXcCD5KywlfOvqWLwbWmsu4UdSBiZ/iGz0LrN2eN
gOxfdxVReVb2RIGOdSQLgh9zdhmnOIEgSLMSLZAjoTxJdWXI5a3KQZ3+/X3JgaOt
DkuCc9/6C59oQH/mdzzwZkVCqIcMxpN9w9E6S3x27uJlic3Y0GRA
-----END RSA PRIVATE KEY-----
File renamed without changes.
File renamed without changes.

0 comments on commit 5694307

Please sign in to comment.