Create unfinished getLocationOfTarget
This commit is contained in:
3
src/app.service.ts
Normal file
3
src/app.service.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const getLocationOfTarget = (target: string) => {
|
||||
return `Location of ${target}`;
|
||||
};
|
@ -1,11 +1,13 @@
|
||||
import express from 'express';
|
||||
import { getLocationOfTarget } from './app.service';
|
||||
|
||||
let app = express();
|
||||
|
||||
app.get('/*', (req, res) => {
|
||||
const target = req.url.slice(1)
|
||||
const target = req.url.slice(1);
|
||||
|
||||
res.send(target)
|
||||
const location = getLocationOfTarget(target);
|
||||
res.send(location);
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
|
Reference in New Issue
Block a user