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
382 B
19 lines
382 B
2 weeks ago
|
import * as express from "express";
|
||
|
import * as cors from "cors";
|
||
|
|
||
|
import { CatType, Cat } from "./app.model";
|
||
|
|
||
|
const app: express.Express = express();
|
||
|
const port: number = 8000;
|
||
|
|
||
|
app.use(cors());
|
||
|
|
||
|
app.get("/", (req: express.Request, res: express.Response) => {
|
||
|
console.log(req);
|
||
|
res.send({ cats: Cat });
|
||
|
});
|
||
|
|
||
|
app.listen(port, () => {
|
||
|
console.log(`server is on ${port}`);
|
||
|
});
|