diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-05-29 14:48:50 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-11-21 17:57:10 -0700 |
commit | f0ca174ada81a0ec4b1bbff9b70fcc680e4ca0ad (patch) | |
tree | 309e713bcb63918a4015c623fd778514c977e8ae /src/app.ts | |
download | chessh_bot-f0ca174ada81a0ec4b1bbff9b70fcc680e4ca0ad.tar.gz chessh_bot-f0ca174ada81a0ec4b1bbff9b70fcc680e4ca0ad.zip |
squash everything since there was profanity in the commit log and maybe people won't like thatHEADmain
Diffstat (limited to 'src/app.ts')
-rw-r--r-- | src/app.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..7fc395f --- /dev/null +++ b/src/app.ts @@ -0,0 +1,24 @@ +import express from 'express'; +import morgan from 'morgan'; +import helmet from 'helmet'; +import cors from 'cors'; + +import * as middlewares from './middlewares'; +import api from './api'; + +import * as dotenv from 'dotenv'; +dotenv.config(); + +const app = express(); + +app.use(morgan('dev')); +app.use(helmet()); +app.use(cors()); +app.use(express.json()); + +app.use('/api', api); + +app.use(middlewares.notFound); +app.use(middlewares.errorHandler); + +export default app; |