server-up-ndot 1.3.0 → 1.3.1

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.
@@ -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](httos://miro-pulgi.duckdns.org/gitpr)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "server-up-ndot",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "server toolkit",
5
5
  "main": "index.js",
6
6
  "bin": {
package/readme.md CHANGED
@@ -47,6 +47,9 @@ npx server-up-ndot create myserver
47
47
 
48
48
  ## 1.3.x
49
49
 
50
+ ### 1.3.1
51
+ - add a PR(github)
52
+
50
53
  ### 1.3.0
51
54
  - add a local build(usage:)
52
55
  ```bash
@@ -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,46 +0,0 @@
1
- /** MIT License
2
-
3
- Copyright (c) 2026 ndot
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
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
- });
@@ -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
- }
@@ -1,8 +0,0 @@
1
- const { spawn } = require("child_process");
2
-
3
- function dev() {
4
- const child = spawn("node", ["app.js"], {
5
- stdio: "inherit"
6
- });
7
- }
8
- module.exports = dev;