mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 09:09:18 +02:00
some progress
This commit is contained in:
parent
aea93a5527
commit
e3c15bd288
1388 changed files with 306946 additions and 68323 deletions
41
api/routes/projects.js
Normal file
41
api/routes/projects.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
projects: [
|
||||
{
|
||||
id: -1,
|
||||
title: 'Template Project',
|
||||
description_short: 'This is a template project.',
|
||||
description: 'This is a template project. It\'s goals are to provide a template for future projects.',
|
||||
technologies: ['A list of technologies used, not languages'],
|
||||
languages: ['A list of languages used, not technologies'],
|
||||
versions: ['A list of versions if not on github or modrinth'],
|
||||
latest_release: 'The latest release if not on github or modrinth',
|
||||
topics: ['A list of topics if not on github'],
|
||||
platforms: ['A list of platforms if not on github', 'github', 'modrinth', 'curseforge', 'website'],
|
||||
os: ['A list of operating systems if not on github', 'windows', 'linux', 'macos', 'android', 'ios'],
|
||||
bg_image: 'https://link.to.image',
|
||||
icon_image: 'https://link.to.image',
|
||||
github: 'https://link.to.github/repo',
|
||||
home: 'https://link.to.home.page',
|
||||
status: 'Release',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
title: 'Website V1',
|
||||
description_short: 'My first attempt at a website.',
|
||||
description: 'My first attempt at a website. It\'s goals were to list the projects I\'ve worked on and provide a way to contact me.',
|
||||
technologies: ['HTML', 'CSS', 'JavaScript'],
|
||||
image: 'https://via.placeholder.com/150',
|
||||
github: 'https://github.com/J-onasJones/J-onasJones.github.io/',
|
||||
live: '',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
title: 'Project Two',
|
||||
description: 'This is the second project',
|
||||
technologies: ['HTML', 'CSS', 'JavaScript'],
|
||||
image: 'https://via.placeholder.com/150',
|
||||
github: '',
|
||||
live: '',
|
||||
}
|
||||
]
|
||||
}
|
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