Basic Typescript configuration.

This commit is contained in:
Patrick Fic
2022-04-28 17:49:41 -07:00
commit 295e4deeb2
12 changed files with 9036 additions and 0 deletions

20
server.ts Normal file
View File

@@ -0,0 +1,20 @@
import express, { Express, Request, Response } from "express";
import dotenv from "dotenv";
import { resolve } from "path";
import InitServer from "./util/serverInit";
import { JobsListMedia } from "./jobs/jobs.get";
dotenv.config({
path: resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`),
});
const app: Express = express();
const port = process.env.PORT;
app.get("/", JobsListMedia);
InitServer();
app.listen(port, () => {
console.log(`⚡️[server]: Server is running at https://localhost:${port}`);
});