You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
375 B
15 lines
375 B
import express from 'express'; |
|
import { configDotenv } from "dotenv"; |
|
import router from './controller/serialPort.js'; |
|
|
|
const app = new express(); |
|
configDotenv(); |
|
|
|
// app.use(express.urlencoded({ extended: false })) |
|
app.use(router) |
|
|
|
async function run() { |
|
app.listen(process.env.PORT); |
|
console.log(`This app listens to http://localhost:${process.env.PORT}`) |
|
} |
|
await run() |