mirror of
https://github.com/NotAShelf/catApi.git
synced 2024-11-22 15:40:42 +00:00
shorten API paths
This commit is contained in:
parent
07aa9b1242
commit
d7c86e1885
1 changed files with 3 additions and 2 deletions
5
index.js
5
index.js
|
@ -7,6 +7,7 @@ require('dotenv').config();
|
|||
const port = process.env.PORT;
|
||||
app.listen(port, () => {
|
||||
console.log('App listening at http://localhost:' + port);
|
||||
console.log('Godspeed, little fella!');
|
||||
});
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
|
@ -32,11 +33,11 @@ app.get('/:id', (req, res) => {
|
|||
}
|
||||
});
|
||||
|
||||
app.get('/api/listimgs', (req, res) => {
|
||||
app.get('/api/list', (req, res) => {
|
||||
return res.json(getAllImageIds());
|
||||
});
|
||||
|
||||
app.get('/api/randomimg', (req, res) => {
|
||||
app.get('/api/random', (req, res) => {
|
||||
return res.json(getRandomImageApi());
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue