-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.js
62 lines (58 loc) · 2.19 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use strict';
const express = require('express');
var app = express();
app.use(express.json());
const image_list = [
{
name: 'AWS',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-0.png',
value: 'Amazon Web Services(AWS)',
link: 'https://aws.amazon.com/ko/?nc2=h_lg'
},
{
name: 'Amazon ECR',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-1.png',
value: 'Amazon Elastic Container Registry',
link: 'https://aws.amazon.com/ko/ecr/'
},
{
name: 'Amazon EKS',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-2.png',
value: 'Amazon Elastic Kubernetes Service',
link: 'https://aws.amazon.com/ko/eks/'
},
{
name: 'Amazon ECS',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-3.png',
value: 'Amazon Elastic Container Service',
link: 'https://aws.amazon.com/ko/ecs/'
},
{
name: 'AWS Fargate',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-4.png',
value: 'Serverless compute for containers',
link: 'https://aws.amazon.com/ko/fargate/'
},
{
name: 'Amazon Cloud9',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-5.png',
value: 'A cloud IDE for writing, running, and debugging code',
link: 'https://aws.amazon.com/ko/cloud9/'
},
{
name: 'AWS CloudFormation',
url: 'https://first-demo-static-web.s3-ap-southeast-1.amazonaws.com/images/demo-image-6.png',
value: 'Speed up cloud provisioning with infrastructure as code',
link: 'https://aws.amazon.com/ko/cloudformation/'
},
]
app.get('/services/all', function (req, res) {
console.log(`${req.method} ${req.url}`);
res.header("Access-Control-Allow-Origin", "*");
res.send({outcome : image_list});
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Server is working : ', host, port);
});