mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 09:09:18 +02:00
some inbetween progress
This commit is contained in:
parent
d9b1d806ee
commit
761cd7d1d7
4 changed files with 9518 additions and 0 deletions
26
server.js
Normal file
26
server.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const express = require('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