Skip to content

Commit

Permalink
feat: set default route to repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenme committed Jun 22, 2019
1 parent bab1866 commit 0a09d6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.get(
);

app.get(
'/repositories',
'(/|/repositories)',
async (req: Request, res: Response): Promise<ApiResponse> => {
try {
const parsedUrl = url.parse(req.originalUrl);
Expand Down Expand Up @@ -115,6 +115,10 @@ app.post(
}
);

app.use((req, res) => {
res.sendStatus(404);
});

app.listen(
PORT,
(): ApiResponse => {
Expand Down

0 comments on commit 0a09d6f

Please sign in to comment.