first commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="GoLibraries">
|
||||
<option name="urls">
|
||||
<set>
|
||||
<option value="file://$MODULE_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,39 @@
|
||||
var port = process.env.PORT || 3000,
|
||||
http = require('http'),
|
||||
fs = require('fs'),
|
||||
html = fs.readFileSync('index.html');
|
||||
|
||||
var log = function(entry) {
|
||||
fs.appendFileSync('/tmp/sample-app.log', new Date().toISOString() + ' - ' + entry + '\n');
|
||||
};
|
||||
|
||||
var server = http.createServer(function (req, res) {
|
||||
if (req.method === 'POST') {
|
||||
var body = '';
|
||||
|
||||
req.on('data', function(chunk) {
|
||||
body += chunk;
|
||||
});
|
||||
|
||||
req.on('end', function() {
|
||||
if (req.url === '/') {
|
||||
log('Received message: ' + body);
|
||||
} else if (req.url = '/scheduled') {
|
||||
log('Received task ' + req.headers['x-aws-sqsd-taskname'] + ' scheduled at ' + req.headers['x-aws-sqsd-scheduled-at']);
|
||||
}
|
||||
|
||||
res.writeHead(200, 'OK', {'Content-Type': 'text/plain'});
|
||||
res.end();
|
||||
});
|
||||
} else {
|
||||
res.writeHead(200);
|
||||
res.write(html);
|
||||
res.end();
|
||||
}
|
||||
});
|
||||
|
||||
// Listen on port 3000, IP defaults to 127.0.0.1
|
||||
server.listen(port);
|
||||
|
||||
// Put a friendly message on the terminal
|
||||
console.log('Server running at http://127.0.0.1:' + port + '/');
|
||||
@@ -0,0 +1,5 @@
|
||||
version: 1
|
||||
cron:
|
||||
- name: "task1"
|
||||
url: "/scheduled"
|
||||
schedule: "* * * * *"
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Elastic Beanstalk</title>
|
||||
<style>
|
||||
body {
|
||||
color: #ffffff;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size:14px;
|
||||
-moz-transition-property: text-shadow;
|
||||
-moz-transition-duration: 4s;
|
||||
-webkit-transition-property: text-shadow;
|
||||
-webkit-transition-duration: 4s;
|
||||
text-shadow: none;
|
||||
}
|
||||
body.blurry {
|
||||
-moz-transition-property: text-shadow;
|
||||
-moz-transition-duration: 4s;
|
||||
-webkit-transition-property: text-shadow;
|
||||
-webkit-transition-duration: 4s;
|
||||
text-shadow: #fff 0px 0px 25px;
|
||||
}
|
||||
a {
|
||||
color: #55aaff;
|
||||
}
|
||||
.textColumn, .linksColumn {
|
||||
padding: 2em;
|
||||
}
|
||||
.textColumn {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 50%;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
|
||||
text-align: right;
|
||||
padding-top: 11em;
|
||||
background-color: blue;
|
||||
|
||||
}
|
||||
.textColumn p {
|
||||
width: 75%;
|
||||
float:right;
|
||||
}
|
||||
.linksColumn {
|
||||
position: absolute;
|
||||
top:0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
left: 50%;
|
||||
|
||||
background-color: #33342D;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #33342D;
|
||||
font-size: 500%;
|
||||
font-weight: normal;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
h2 {
|
||||
font-size: 200%;
|
||||
font-weight: normal;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
ul {
|
||||
padding-left: 1em;
|
||||
margin: 0px;
|
||||
}
|
||||
li {
|
||||
margin: 1em 0em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="textColumn">
|
||||
<h1>Congratulations</h1>
|
||||
<p>Your first AWS Elastic Beanstalk Node.js application is now running on your own dedicated environment in the AWS Cloud</p>
|
||||
<p>This environment is launched with Elastic Beanstalk Node.js Platform</p>
|
||||
</div>
|
||||
<div class="linksColumn">
|
||||
<h2>What's Next?</h2>
|
||||
<ul>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html">AWS Elastic Beanstalk overview</a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.html">AWS Elastic Beanstalk concepts</a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html">Deploy an Express Application to AWS Elastic Beanstalk</a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express_elasticache.html">Deploy an Express Application with Amazon ElastiCache to AWS Elastic Beanstalk</a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_geddy_elasticache.html">Deploy a Geddy Application with Amazon ElastiCache to AWS Elastic Beanstalk </a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_custom_container.html">Customizing and Configuring a Node.js Container </a></li>
|
||||
<li><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.loggingS3.title.html">Working with Logs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Elastic-Beanstalk-Sample-App",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
"start": "node app.js"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user