qwik-account-manager/index.js

23 lines
441 B
JavaScript

import dotenv from 'dotenv'
import express from 'express'
import ROUTES from './routes/routes.js'
import { dbInit } from './libs/database.js'
dotenv.config()
const APP = express()
const PORT = process.env.PORT ?? 12345
dbInit()
APP.use(express.urlencoded({ extended: true }))
APP.use('/static', express.static('static'))
APP.use('/', ROUTES)
APP.listen(
PORT,
() => console.log('Server started at http://localhost:' + PORT)
)