-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Samuel Bodin
authored
Jul 10, 2021
1 parent
6b248b5
commit 95587a3
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import http from 'http'; | ||
|
||
import { log } from './utils/log'; | ||
|
||
export function createAPI(): void { | ||
const server = http.createServer((req, res) => { | ||
res.writeHead(200, { 'Content-Type': 'application/json' }); | ||
res.end( | ||
JSON.stringify({ | ||
code: 200, | ||
}) | ||
); | ||
}); | ||
|
||
server.listen(8000, () => { | ||
log.info(`⛑ API started on port 8000`); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters