Skip to content

Commit 468f90e

Browse files
Initial commit
1 parent fe619e3 commit 468f90e

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
# **AWS Elastic Beanstalk NodeJS Sample Application**
2-
3-
Sample Elastic Beanstalk NodeJS application from the BackSpace Academy AWS certification preparation course.
4-
Change background colour in static/app/css/app.css to see changes when doing a Blue / Green deployment
5-
https://backspace.academy/
1+
# aws-nodejs-eb-codebuild

buildspec.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file.
2+
version: 0.2
3+
4+
phases:
5+
install:
6+
commands:
7+
- echo Installing Mocha...
8+
- npm install -g mocha
9+
pre_build:
10+
commands:
11+
- echo Installing source NPM dependencies...
12+
- npm install
13+
- npm install unit.js
14+
build:
15+
commands:
16+
- echo Build started on `date`
17+
- echo Compiling the Node.js code
18+
- mocha test.js
19+
post_build:
20+
commands:
21+
- echo Build completed on `date`
22+
# Include only the files required for your application to run.
23+
# Do not use recursively include artifacts from node_modules directory as it will include unnecessary packages
24+
# used only for building and testing.
25+
# ExpressJS apps will need other artifact directories included (bin/*, public/*, routes/*, views/* etc).
26+
artifacts:
27+
files:
28+
- app.js
29+
- static/*
30+
- views/*
31+
- package.json
32+
- node_modules/async/*
33+
- node_modules/lodash/*
34+
- node_modules/pug/*
35+
- node_modules/http/*
36+
- node_modules/aws-sdk/*
37+
- node_modules/express/*
38+
- node_modules/body-parser/*
39+
- node_modules/querystring/*

static/app/css/app.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.container {
2-
background-color: Lime;
1+
.jumbotron {
2+
background-color: LightSkyBlue;
33
}

test.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*************Test******************/
2+
var test = require('unit.js');
3+
var str = 'Hello, world!';
4+
5+
test.string(str).startsWith('Hello');
6+
7+
if (test.string(str).startsWith('Hello')) {
8+
console.log('Passed');
9+
}
10+
/***********************************/

0 commit comments

Comments
 (0)