16 lines
331 B
TypeScript
16 lines
331 B
TypeScript
import express from 'express';
|
|
import { getLocationOfTarget } from './app.service';
|
|
|
|
let app = express();
|
|
|
|
app.get('/*', (req, res) => {
|
|
const target = req.url.slice(1);
|
|
|
|
const location = getLocationOfTarget(target);
|
|
res.send(location);
|
|
});
|
|
|
|
app.listen(3000, () => {
|
|
console.log('Now listening on port 3000!');
|
|
});
|