Skip to content

Commit 56f961d

Browse files
kuujierikkrieg
andcommitted
Adds example using the concurrency deploy feature
Co-authored-by: erikkrieg <[email protected]>
1 parent 25a66ad commit 56f961d

File tree

6 files changed

+2967
-0
lines changed

6 files changed

+2967
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Dockerfile
2+
.devspace/
3+
chart/
4+
node_modules/
5+
test/
6+
devspace.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Dockerfile
2+
.devspace/
3+
chart/
4+
node_modules/
5+
test/
6+
devspace.yaml
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set +e # Continue on errors
3+
4+
export NODE_ENV=development
5+
if [ -f "yarn.lock" ]; then
6+
echo "Installing Yarn Dependencies"
7+
yarn
8+
else
9+
if [ -f "package.json" ]; then
10+
echo "Installing NPM Dependencies"
11+
npm install
12+
fi
13+
fi
14+
15+
COLOR_CYAN="\033[0;36m"
16+
COLOR_RESET="\033[0m"
17+
18+
echo -e "${COLOR_CYAN}
19+
____ ____
20+
| _ \ _____ __/ ___| _ __ __ _ ___ ___
21+
| | | |/ _ \ \ / /\___ \| '_ \ / _\` |/ __/ _ \\
22+
| |_| | __/\ V / ___) | |_) | (_| | (_| __/
23+
|____/ \___| \_/ |____/| .__/ \__,_|\___\___|
24+
|_|
25+
${COLOR_RESET}
26+
Welcome to your development container!
27+
This is how you can work with it:
28+
- Run \`${COLOR_CYAN}npm start${COLOR_RESET}\` to start the application
29+
- ${COLOR_CYAN}Files will be synchronized${COLOR_RESET} between your local machine and this container
30+
- Some ports will be forwarded, so you can access this container on your local machine via ${COLOR_CYAN}http://localhost:3000${COLOR_RESET}
31+
"
32+
33+
bash
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const express = require('express')
2+
const app = express()
3+
const port = 3000
4+
5+
app.get('/', (req, res) => {
6+
res.send(`
7+
<html>
8+
<head>
9+
<link rel="stylesheet" href="https://devspace.sh/css/quickstart.css">
10+
</head>
11+
<body>
12+
<img src="https://devspace.sh/images/congrats.gif" />
13+
<h1>You deployed this project with DevSpace!</h1>
14+
<div>
15+
<h2>Now it's time to code:</h2>
16+
<ol>
17+
<li>Edit this text in <code>index.js</code> and save the file</li>
18+
<li>Check the logs to see how DevSpace restarts your container</li>
19+
<li>Reload browser to see the changes</li>
20+
</ol>
21+
</div>
22+
</body>
23+
</html>
24+
`)
25+
})
26+
27+
app.listen(port, () => console.log("Example app listening on http://localhost:" + port))

0 commit comments

Comments
 (0)