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.
19 lines
458 B
19 lines
458 B
import { router as apiRouter } from './routes/api'; |
|
import { port } from './config'; |
|
|
|
import * as express from 'express'; |
|
import * as bodyParser from 'body-parser'; |
|
|
|
|
|
const app = express(); |
|
|
|
app.use(bodyParser.json()); |
|
app.use(bodyParser.urlencoded({ extended: true })); |
|
|
|
app.use('/api', apiRouter); |
|
|
|
app.use('/', (req, res) => { res.send('Grafana-data-exporter server works') }); |
|
|
|
app.listen(port, () => { |
|
console.log(`Server is running on :${port}`); |
|
})
|
|
|