Skip to content

Commit

Permalink
add test apps
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town committed Mar 5, 2024
1 parent 6e34ef6 commit dec7639
Show file tree
Hide file tree
Showing 42 changed files with 5,468 additions and 0 deletions.
15 changes: 15 additions & 0 deletions js-test-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Development environment
# -----------------------
FROM node:latest
WORKDIR /webpack

COPY package*.json ./

RUN npm install

ENV NODE_ENV=development
ARG SPONSOR

COPY docker ./

CMD node index.js
1 change: 1 addition & 0 deletions js-test-app/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
15 changes: 15 additions & 0 deletions js-test-app/buildpack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: v2
name: js-test-app-buildpack
services:
- name: web
run: node index.js
type: web
port: 3000
build:
context: ./
method: pack
builder: heroku/buildpacks:20
buildpacks:
- heroku/nodejs
predeploy:
run: ls
13 changes: 13 additions & 0 deletions js-test-app/dockerfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: v2
name: js-test-app-dockerfile
services:
- name: web
run: node index.js
type: web
port: 3000
build:
context: ./
method: docker
dockerfile: ./docker/Dockerfile
predeploy:
run: ls
11 changes: 11 additions & 0 deletions js-test-app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require('express');
const app = express();

app.use(express.static('public'));

app.get('/', (req, res) => {
res.send('Tetris time.');
});

var sponsor = process.env.SPONSOR || "unsponsored";
app.listen(process.env.PORT || 3000, () => console.log('Tetris app listening on port 3000! Brought to you all by', sponsor + ", of course."));
Loading

0 comments on commit dec7639

Please sign in to comment.