14 lines
349 B
TypeScript
14 lines
349 B
TypeScript
|
import express, { Express } from 'express';
|
||
|
import avatarsMiddleware from 'adorable-avatars';
|
||
|
import dotenv from 'dotenv';
|
||
|
|
||
|
dotenv.config();
|
||
|
|
||
|
const app: Express = express();
|
||
|
const port = process.env.PORT;
|
||
|
|
||
|
app.use('/', avatarsMiddleware);
|
||
|
|
||
|
app.listen(port, () => {
|
||
|
console.log(`⚡️[server]: Server is running at https://localhost:${port}`);
|
||
|
});
|