ddstats-server/index.js

22 lines
519 B
JavaScript

import express from 'express'
import databaseHandler from './libs/databaseHandler.js'
import dotenv from 'dotenv'
// Read the .env file
dotenv.config()
const Server = express()
Server.get('/', (req, res) =>
res.status(200)
.json(
{
status: "OK!",
message: "The API is up and running! The current version is: 0.0.1"
}
)
)
console.log(databaseHandler.getAllMaps("BurnyLlama"))
Server.listen(12345, () => console.log("Server has started!"))