This repository has been archived on 2022-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
ContainerImage.WendyUI/Fastify/server.js
djpbessems 8234993e3d
Some checks failed
continuous-integration/drone/push Build is failing
Cleanup redundant yaml fragments;Added more list items to Fastify
2022-02-14 14:13:10 +01:00

40 lines
791 B
JavaScript

// Require the framework and instantiate it
const fastify = require('fastify')({ logger: true })
// Declare a route
fastify.get('/', async (request, reply) => {
return [
{
component: 'VI_IT_VIRTUALIZATION',
version: '2.4.0',
os: 'vSphere 7.0U3a'
},
{
component: 'VI_IT_SRV_LIN_UBUNTU',
version: '1.3.0',
os: 'Ubuntu 18.04 LTS'
},
{
component: 'VI_IT_SRV_WIN',
version: '3.9.1',
os: 'Windows Server 2019 Enterprise'
},
{
component: 'VI_IT_CLT_WIN',
version: '3.6.0',
os: 'Windows 10 IoT Enterprise'
}
]
})
// Run the server!
const start = async () => {
try {
await fastify.listen(3001, '0.0.0.0')
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
}
start()