Skip to content

Commit fbc5348

Browse files
committed
packege is public
0 parents  commit fbc5348

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+4675
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# cwa-backend-setup
2+
3+
`cwd-backend-setup` is a CLI tool to automate the setup of a common Express.js backend. This tool helps you quickly scaffold a backend setup without rewriting the setup each time.
4+
5+
## Features
6+
7+
- Copies a predefined backend setup to your current working directory
8+
- Includes common configurations such as `.env.example`, `.eslintignore`, `.eslintrc`, `.gitignore`, `.prettierrc`, `docker-compose.yml`, `Dockerfile`, `package.json`, and `tsconfig.json`
9+
- Easily extendable to include more configurations as needed
10+
11+
## Installation
12+
13+
To install `cwa-server-setup`, you need to have Node.js and npm installed on your machine. You can install the package globally using npm:
14+
15+
```sh
16+
npm install -g cwa-backend-setup
17+
```
18+
19+
```sh
20+
cwa-backend-setup
21+
```

bin/cli.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env node
2+
3+
const path = require("path");
4+
const fs = require("fs-extra");
5+
6+
const srcDir = path.join(__dirname, "../server");
7+
const destDir = process.cwd();
8+
9+
fs.copy(srcDir, destDir, (err) => {
10+
if (err) {
11+
console.error("Error copying backend setup:", err);
12+
} else {
13+
console.log("Backend setup successfully copied!");
14+
console.log("You can start your server by running:");
15+
console.log("cd server");
16+
console.log("yarn install");
17+
console.log("yarn dev");
18+
}
19+
});

node_modules/.package-lock.json

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/fs-extra/LICENSE

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/fs-extra/README.md

Lines changed: 292 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)