server-up-ndot 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +40 -0
- package/{server-up-ndot/index.js → LICENSE.md} +2 -27
- package/package.json +1 -1
- package/readme.md +6 -0
- package/server-up-ndot/bin/cli.js +0 -17
- package/server-up-ndot/lib/create.js +0 -38
- package/server-up-ndot/lib/dev.js +0 -8
- package/server-up-ndot/package-lock.json +0 -6275
- package/server-up-ndot/package.json +0 -64
- package/server-up-ndot/readme.md +0 -108
- package/server-up-ndot/templates/basic/.env +0 -3
- package/server-up-ndot/templates/basic/app.js +0 -64
- package/server-up-ndot/templates/basic/package.json +0 -8
- package/server-up-ndot/templates/basic/public/index.html +0 -2
- package/server-up-ndot/templates/basic/public/nonehtml.html +0 -3
- package/server-up-ndot/templates/basic/routes/index.js +0 -8
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# guide for..
|
|
2
|
+
## 1.PR(pull requst)
|
|
3
|
+
# How to Submit a Pull Request (PR)
|
|
4
|
+
|
|
5
|
+
1. **Fork the Repository**
|
|
6
|
+
- Click the "Fork" button at the top-right of the repository page to create your own copy.
|
|
7
|
+
|
|
8
|
+
2. **Clone Your Fork**
|
|
9
|
+
- Run `git clone https://github.com/your-username/repo-name.git` to copy the fork to your local machine.
|
|
10
|
+
|
|
11
|
+
3. **Create a New Branch**
|
|
12
|
+
- Use `git checkout -b feature/your-feature-name` to create a branch for your changes.
|
|
13
|
+
|
|
14
|
+
4. **Make Changes Locally**
|
|
15
|
+
- Edit files, add features, or fix bugs in your branch.
|
|
16
|
+
|
|
17
|
+
5. **Test Your Changes**
|
|
18
|
+
- Ensure your changes work correctly and do not break existing features.
|
|
19
|
+
|
|
20
|
+
6. **Stage and Commit Changes**
|
|
21
|
+
- Run `git add .` to stage your changes.
|
|
22
|
+
- Run `git commit -m "Brief description of your changes"` to commit.
|
|
23
|
+
|
|
24
|
+
7. **Push Changes to Your Fork**
|
|
25
|
+
- Use `git push origin feature/your-feature-name` to upload your branch to your GitHub fork.
|
|
26
|
+
|
|
27
|
+
8. **Open a Pull Request**
|
|
28
|
+
- Go to your fork on GitHub and click "Compare & Pull Request".
|
|
29
|
+
- Select the base repository and branch to merge into.
|
|
30
|
+
|
|
31
|
+
9. **Provide a Clear Description**
|
|
32
|
+
- Explain what your PR does, why it is needed, and any relevant issue numbers.
|
|
33
|
+
|
|
34
|
+
10. **Request Review and Merge**
|
|
35
|
+
- Assign reviewers if needed.
|
|
36
|
+
- After approval, the PR can be merged into the main repository.
|
|
37
|
+
|
|
38
|
+
## site Guidw
|
|
39
|
+
url:
|
|
40
|
+
[site](https://miro-pulgi.duckdns.org/gitpr)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026 ndot
|
|
3
|
+
Copyright (c) 2026 ndot and segfaultandsegmentationfault
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,28 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
-
*/
|
|
23
|
-
const express = require('express');
|
|
24
|
-
const cors = require('cors');
|
|
25
|
-
require('dotenv').config();
|
|
26
|
-
|
|
27
|
-
const app = express();
|
|
28
|
-
const PORT = process.env.PORT || 3000;
|
|
29
|
-
|
|
30
|
-
app.use(cors());
|
|
31
|
-
app.use(express.json());
|
|
32
|
-
|
|
33
|
-
// GET
|
|
34
|
-
app.get('/', (req, res) => {
|
|
35
|
-
res.send('segfaultandsegmentationfault');
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// POST
|
|
39
|
-
app.post('/api', (req, res) => {
|
|
40
|
-
res.json({ received: req.body });
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// server start
|
|
44
|
-
app.listen(PORT, () => {
|
|
45
|
-
console.log(`Server running on http://localhost:${PORT}`);
|
|
46
|
-
});
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const create = require("../lib/create");
|
|
4
|
-
|
|
5
|
-
const dev = require("../lib/dev");
|
|
6
|
-
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
if (args[0] === "create") {
|
|
10
|
-
create(args[1] || "server-app");
|
|
11
|
-
}
|
|
12
|
-
else if (args[0] === "dev") {
|
|
13
|
-
dev()
|
|
14
|
-
} else {
|
|
15
|
-
console.log("Usage:");
|
|
16
|
-
console.log("server-up-ndot create <project-name>");
|
|
17
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
|
|
4
|
-
module.exports = function create(name){
|
|
5
|
-
|
|
6
|
-
const projectPath = path.join(process.cwd(), name);
|
|
7
|
-
const templatePath = path.join(__dirname, "../templates/basic");
|
|
8
|
-
|
|
9
|
-
if(fs.existsSync(projectPath)){
|
|
10
|
-
console.log("Folder already exists");
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
fs.mkdirSync(projectPath);
|
|
15
|
-
copyFolder(templatePath, projectPath);
|
|
16
|
-
|
|
17
|
-
console.log("Server created:", name);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
function copyFolder(src,dest){
|
|
21
|
-
|
|
22
|
-
const files = fs.readdirSync(src);
|
|
23
|
-
|
|
24
|
-
files.forEach(file=>{
|
|
25
|
-
|
|
26
|
-
const srcPath = path.join(src,file);
|
|
27
|
-
const destPath = path.join(dest,file);
|
|
28
|
-
|
|
29
|
-
if(fs.statSync(srcPath).isDirectory()){
|
|
30
|
-
fs.mkdirSync(destPath);
|
|
31
|
-
copyFolder(srcPath,destPath);
|
|
32
|
-
}else{
|
|
33
|
-
fs.copyFileSync(srcPath,destPath);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
}
|