Skip to content
Open

a #51

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file modified modulo05/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions modulo05/heranca-polimorfismo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
build/
.env
.DS_Store
21 changes: 21 additions & 0 deletions modulo05/heranca-polimorfismo/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions modulo05/heranca-polimorfismo/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions modulo05/heranca-polimorfismo/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import express from "express";
import cors from "cors";
import { AddressInfo } from "net";

export const app = express();
app.use(express.json());
app.use(cors());

const server = app.listen(process.env.PORT || 3003, () => {
if (server) {
const address = server.address() as AddressInfo;
console.log(`Server is running in http://localhost:${address.port}`);
} else {
console.error(`Failure upon starting server.`);
}
});
Loading