mirror of
https://github.com/Floriansylvain/SnippetsManager.git
synced 2026-08-19 11:43:15 +02:00
More docker, express and config setup
This commit is contained in:
+18
-1
@@ -1 +1,18 @@
|
||||
console.log('pouet]')
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import express from 'express'
|
||||
import * as dotenv from 'dotenv'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const app = express()
|
||||
const prisma = new PrismaClient()
|
||||
const port = process.env.API_PORT
|
||||
|
||||
app.use(express.json())
|
||||
app.use(express.urlencoded({ extended: false }))
|
||||
|
||||
app.get('/v1/', async (req, res, next) => {
|
||||
res.send({ code: 200, message: "SnippetsManager v1.0" })
|
||||
})
|
||||
|
||||
app.listen(port, () => console.log(`Listening on port ${port}`))
|
||||
Reference in New Issue
Block a user