-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: bing webmaster verification key
- Loading branch information
1 parent
4880add
commit 161e174
Showing
13 changed files
with
160 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<users> | ||
<user>A5BAF2CED21531C2027D8B084BCA761C</user> | ||
</users> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,41 @@ | ||
import dotenv from 'dotenv'; | ||
import path from 'path'; | ||
import compression from 'compression'; | ||
// import morgan from "morgan"; | ||
import express from 'express'; | ||
import {AppRouter} from './routes/routes'; | ||
import {connectDB} from './data/mongo-database.config'; | ||
import {ExpressApp} from './config/express.config'; | ||
import { AppRouter } from './routes/routes'; | ||
import { connectDB } from './data/mongo-database.config'; | ||
import { ExpressApp } from './config/express.config'; | ||
|
||
// Load environment variables from .env file | ||
dotenv.config({ | ||
path: path.resolve(__dirname, '../.env') | ||
}); | ||
|
||
const APP_PORT: string | number = process.env.PORT || 4000; | ||
|
||
connectDB().then(r => console.log(r)).catch(e => console.log(e)); | ||
const startServer = async () => { | ||
try { | ||
// Connect to the database | ||
await connectDB(); | ||
console.log('Database connected successfully'); | ||
|
||
const Middleware = [ | ||
express.json, | ||
compression | ||
]; | ||
|
||
const app: express.Application = new ExpressApp( | ||
Middleware, | ||
AppRouter | ||
).getApp(); | ||
|
||
// app.use(morgan('dev')); | ||
|
||
app.listen(APP_PORT, | ||
() => { | ||
// Create the express application | ||
const app: express.Application = new ExpressApp( | ||
[ | ||
express.json(), | ||
compression() | ||
], | ||
AppRouter | ||
).getApp(); | ||
// Start the server | ||
app.listen(APP_PORT, () => { | ||
console.log(`[server]: Server is running at http://localhost:${APP_PORT}`); | ||
} | ||
); | ||
}); | ||
} catch (error) { | ||
console.error('Failed to start the server:', error); | ||
process.exit(1); // Exit with failure | ||
} | ||
}; | ||
|
||
// noinspection JSIgnoredPromiseFromCall | ||
startServer(); |
Oops, something went wrong.