-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
56 lines (42 loc) · 1.14 KB
/
setup.sh
File metadata and controls
56 lines (42 loc) · 1.14 KB
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
#!/bin/bash
Init npm and install express
npm init -y
npm install express
Create basic structure
mkdir routes
touch server.js .env .gitignore README.md routes/posts.js
Add .env content
echo "PORT=5000" > .env
Add .gitignore content
echo "node_modules/
.env" > .gitignore
Add Express boilerplate to server.js
echo 'import express from "express";
const app = express();
app.use(express.json());
const port = process.env.PORT || 5000;
app.listen(port, () => console.log(`Server running on port ${port}`));
' > server.js
Add basic README content
echo '# Express + Bash Setup (Mobile)
Learning Express.js and Bash scripting at the same time — built entirely on Android using Termux.
What this script does:
- Initializes npm
- Installs Express
- Creates project files
- Sets up boilerplate code
- Adds .env and .gitignore
This way:
- Made a seperate repo
- My code remaians clean
- My bash stands out
- I now have two stronge public project from
my phone
🔧 Setup Script
Run `./setup.sh`
to auto-create the project with all needed files and structure.
' > README.md
Init Git and commit
git init
git add .
git commit -m "Setup Express project with Bash script"