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.

20 lines
458 B

import { router as apiRouter } from './routes/api';
import { port } from './config';
6 years ago
import * as express from 'express';
import * as bodyParser from 'body-parser';
6 years ago
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use('/api', apiRouter);
6 years ago
app.use('/', (req, res) => { res.send('Grafana-data-exporter server works') });
6 years ago
app.listen(port, () => {
console.log(`Server is running on :${port}`);
6 years ago
})