mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 00:59:18 +02:00
some progress
This commit is contained in:
parent
aea93a5527
commit
e3c15bd288
1388 changed files with 306946 additions and 68323 deletions
26
api/routes/routes.js
Normal file
26
api/routes/routes.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
import express from 'express';
|
||||
const app = express();
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Welcome to the jonas_jones-api!')
|
||||
});
|
||||
|
||||
app.get('/projects', (req, res) => {
|
||||
const keyword = req.query.keyword;
|
||||
const version = req.query.version;
|
||||
const platform = req.query.platform;
|
||||
const topic = req.query.topic;
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
projects: {
|
||||
keyword: keyword,
|
||||
version: version,
|
||||
platform: platform,
|
||||
topic: topic,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
app.listen(8000, () => {
|
||||
console.log('api listening on port 8000!')
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue