makepack 1.3.6 → 1.3.8
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/README.md +146 -146
- package/package.json +56 -56
- package/src/actions/create/files/gitignore.js +5 -5
- package/src/actions/create/files/makepack.js +19 -19
- package/src/actions/create/files/package-json.js +42 -42
- package/src/actions/create/files/project-js.js +12 -12
- package/src/actions/create/files/project-jsx.js +50 -50
- package/src/actions/create/files/project-ts.js +10 -10
- package/src/actions/create/files/project-tsx.js +50 -50
- package/src/actions/create/files/readme.md.js +13 -13
- package/src/actions/create/files/serve.js +51 -51
- package/src/actions/create/files/tsconfig.js +32 -32
- package/src/actions/create/index.js +29 -29
- package/src/actions/create/makeFiles.js +64 -64
- package/src/actions/create/makeProjectDirectory.js +41 -41
- package/src/actions/create/makeProjectInformation.js +67 -67
- package/src/actions/pack/index.js +94 -112
- package/src/actions/serve/index.js +96 -106
- package/src/helpers.js +121 -69
- package/src/index.js +30 -30
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import inquirer from "inquirer"
|
|
2
|
-
import makeProjectDirectory from "./makeProjectDirectory.js"
|
|
3
|
-
import fs from "fs-extra"
|
|
4
|
-
import path from "path"
|
|
5
|
-
const cwd = process.cwd()
|
|
6
|
-
const cwdFolder = cwd.split(path.sep).pop()
|
|
7
|
-
|
|
8
|
-
const makeProjectInformation = async () => {
|
|
9
|
-
const projectDir = await makeProjectDirectory()
|
|
10
|
-
const information = await inquirer.prompt([
|
|
11
|
-
{
|
|
12
|
-
type: 'list',
|
|
13
|
-
name: 'template',
|
|
14
|
-
message: 'Select a template',
|
|
15
|
-
choices: ['typescript', 'javascript', 'react with typescript', 'react with javascript'],
|
|
16
|
-
default: 'typeScript'
|
|
17
|
-
}
|
|
18
|
-
])
|
|
19
|
-
|
|
20
|
-
if (projectDir.dirname !== cwdFolder) {
|
|
21
|
-
fs.removeSync(projectDir.cwd)
|
|
22
|
-
fs.mkdirSync(projectDir.cwd)
|
|
23
|
-
}
|
|
24
|
-
information.entry = "index"
|
|
25
|
-
information.rootdir = "src"
|
|
26
|
-
|
|
27
|
-
switch (information.template) {
|
|
28
|
-
case "typescript":
|
|
29
|
-
information.entry = information.entry + ".ts"
|
|
30
|
-
break;
|
|
31
|
-
case "javascript":
|
|
32
|
-
information.entry = information.entry + ".js"
|
|
33
|
-
break;
|
|
34
|
-
case "react with typescript":
|
|
35
|
-
information.entry = information.entry + ".tsx"
|
|
36
|
-
break;
|
|
37
|
-
case "react with javascript":
|
|
38
|
-
information.entry = information.entry + ".jsx"
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// check if the root directory exists
|
|
43
|
-
if (!fs.existsSync(path.join(projectDir.cwd, information.rootdir))) {
|
|
44
|
-
fs.mkdirSync(path.join(projectDir.cwd, information.rootdir))
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/*
|
|
48
|
-
{
|
|
49
|
-
port: 3000,
|
|
50
|
-
outdir: "pack",
|
|
51
|
-
cwd: 'C:\xampp\htdocs\makepack\asd',
|
|
52
|
-
dirname: 'asd',
|
|
53
|
-
isCurrentDir: false,
|
|
54
|
-
template: 'typescript',
|
|
55
|
-
rootdir: 'src',
|
|
56
|
-
entry: 'index'
|
|
57
|
-
}
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
// port: 3000,
|
|
62
|
-
outdir: "pack",
|
|
63
|
-
...projectDir,
|
|
64
|
-
...information
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
1
|
+
import inquirer from "inquirer"
|
|
2
|
+
import makeProjectDirectory from "./makeProjectDirectory.js"
|
|
3
|
+
import fs from "fs-extra"
|
|
4
|
+
import path from "path"
|
|
5
|
+
const cwd = process.cwd()
|
|
6
|
+
const cwdFolder = cwd.split(path.sep).pop()
|
|
7
|
+
|
|
8
|
+
const makeProjectInformation = async () => {
|
|
9
|
+
const projectDir = await makeProjectDirectory()
|
|
10
|
+
const information = await inquirer.prompt([
|
|
11
|
+
{
|
|
12
|
+
type: 'list',
|
|
13
|
+
name: 'template',
|
|
14
|
+
message: 'Select a template',
|
|
15
|
+
choices: ['typescript', 'javascript', 'react with typescript', 'react with javascript'],
|
|
16
|
+
default: 'typeScript'
|
|
17
|
+
}
|
|
18
|
+
])
|
|
19
|
+
|
|
20
|
+
if (projectDir.dirname !== cwdFolder) {
|
|
21
|
+
fs.removeSync(projectDir.cwd)
|
|
22
|
+
fs.mkdirSync(projectDir.cwd)
|
|
23
|
+
}
|
|
24
|
+
information.entry = "index"
|
|
25
|
+
information.rootdir = "src"
|
|
26
|
+
|
|
27
|
+
switch (information.template) {
|
|
28
|
+
case "typescript":
|
|
29
|
+
information.entry = information.entry + ".ts"
|
|
30
|
+
break;
|
|
31
|
+
case "javascript":
|
|
32
|
+
information.entry = information.entry + ".js"
|
|
33
|
+
break;
|
|
34
|
+
case "react with typescript":
|
|
35
|
+
information.entry = information.entry + ".tsx"
|
|
36
|
+
break;
|
|
37
|
+
case "react with javascript":
|
|
38
|
+
information.entry = information.entry + ".jsx"
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// check if the root directory exists
|
|
43
|
+
if (!fs.existsSync(path.join(projectDir.cwd, information.rootdir))) {
|
|
44
|
+
fs.mkdirSync(path.join(projectDir.cwd, information.rootdir))
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
{
|
|
49
|
+
port: 3000,
|
|
50
|
+
outdir: "pack",
|
|
51
|
+
cwd: 'C:\xampp\htdocs\makepack\asd',
|
|
52
|
+
dirname: 'asd',
|
|
53
|
+
isCurrentDir: false,
|
|
54
|
+
template: 'typescript',
|
|
55
|
+
rootdir: 'src',
|
|
56
|
+
entry: 'index'
|
|
57
|
+
}
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
// port: 3000,
|
|
62
|
+
outdir: "pack",
|
|
63
|
+
...projectDir,
|
|
64
|
+
...information
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
68
|
export default makeProjectInformation
|
|
@@ -1,113 +1,95 @@
|
|
|
1
|
-
import esbuild from 'esbuild';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { glob } from 'glob'
|
|
5
|
-
import ts from 'typescript'
|
|
6
|
-
import { execSync, logLoader, loadConfig } from '../../helpers.js';
|
|
7
|
-
|
|
8
|
-
const pack = async (args) => {
|
|
9
|
-
args.outdir = 'pack'
|
|
10
|
-
try {
|
|
11
|
-
fs.removeSync(path.join(process.cwd(), args.outdir));
|
|
12
|
-
fs.mkdirSync(path.join(process.cwd(), args.outdir));
|
|
13
|
-
} catch (err) { }
|
|
14
|
-
|
|
15
|
-
const files = await glob('src/**/*.{tsx,ts,js,jsx}') || []
|
|
16
|
-
const entryPoints = files.map(entry => path.join(process.cwd(), entry))
|
|
17
|
-
let loader = logLoader("Generating a production build for the package...")
|
|
18
|
-
const
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
fs.writeFileSync(path.join(process.cwd(), args.outdir, '/package.json'), JSON.stringify(packageJson, null, 2));
|
|
97
|
-
|
|
98
|
-
fs.copyFileSync(path.join(process.cwd(), '/readme.md'), path.join(process.cwd(), args.outdir, `/readme.md`))
|
|
99
|
-
console.log('✅ Production build generated successfully! The package is ready for deployment.');
|
|
100
|
-
|
|
101
|
-
if (args.publish) {
|
|
102
|
-
console.log("Publishing the production build to the npm repository...")
|
|
103
|
-
execSync(`npm publish`, {
|
|
104
|
-
cwd: path.join(process.cwd(), args.outdir)
|
|
105
|
-
})
|
|
106
|
-
} else {
|
|
107
|
-
console.log(`To publish your package:\n1. Navigate to the ${args.outdir} directory:\ncd ./${args.outdir}\n2. Publish the package to npm:\nnpm publish\nYour package is ready to share with the world! 🚀`);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
1
|
+
import esbuild from 'esbuild';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { glob } from 'glob'
|
|
5
|
+
import ts from 'typescript'
|
|
6
|
+
import { execSync, logLoader, loadConfig } from '../../helpers.js';
|
|
7
|
+
|
|
8
|
+
const pack = async (args) => {
|
|
9
|
+
args.outdir = 'pack'
|
|
10
|
+
try {
|
|
11
|
+
fs.removeSync(path.join(process.cwd(), args.outdir));
|
|
12
|
+
fs.mkdirSync(path.join(process.cwd(), args.outdir));
|
|
13
|
+
} catch (err) { }
|
|
14
|
+
|
|
15
|
+
const files = await glob('src/**/*.{tsx,ts,js,jsx}') || []
|
|
16
|
+
const entryPoints = files.map(entry => path.join(process.cwd(), entry))
|
|
17
|
+
let loader = logLoader("Generating a production build for the package...")
|
|
18
|
+
const config = await loadConfig(args)
|
|
19
|
+
const packConfig = config.pack || {}
|
|
20
|
+
const esmConfig = packConfig?.esm
|
|
21
|
+
const cjsConfig = packConfig?.cjs
|
|
22
|
+
const tsConfig = packConfig?.tsconfig
|
|
23
|
+
|
|
24
|
+
async function build(format) {
|
|
25
|
+
return esbuild.buildSync({
|
|
26
|
+
...(format === 'esm' ? esmConfig : cjsConfig),
|
|
27
|
+
format: format,
|
|
28
|
+
entryPoints,
|
|
29
|
+
outdir: path.join(process.cwd(), args.outdir, format),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
esmConfig && await build('esm')
|
|
34
|
+
cjsConfig && await build('cjs')
|
|
35
|
+
|
|
36
|
+
loader.stop()
|
|
37
|
+
if (tsConfig) {
|
|
38
|
+
loader = logLoader("🔄 Generating TypeScript declarations...")
|
|
39
|
+
const program = ts.createProgram(files, tsConfig);
|
|
40
|
+
const emitResult = program.emit();
|
|
41
|
+
const diagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
42
|
+
|
|
43
|
+
if (diagnostics.length > 0) {
|
|
44
|
+
diagnostics.forEach(diagnostic => {
|
|
45
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
|
46
|
+
if (diagnostic.file) {
|
|
47
|
+
const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
48
|
+
console.error(`Error at ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
49
|
+
} else {
|
|
50
|
+
console.error(`Error: ${message}`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
console.log('✅ TypeScript declaration files generated successfully!');
|
|
55
|
+
}
|
|
56
|
+
loader.stop()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let packageJson = JSON.parse(fs.readFileSync(path.join(process.cwd(), '/package.json'), 'utf8'));
|
|
60
|
+
|
|
61
|
+
let name = packageJson.name
|
|
62
|
+
let version = packageJson.version
|
|
63
|
+
let description = packageJson.description
|
|
64
|
+
delete packageJson.name
|
|
65
|
+
delete packageJson.version
|
|
66
|
+
delete packageJson.description
|
|
67
|
+
|
|
68
|
+
packageJson = {
|
|
69
|
+
name,
|
|
70
|
+
version,
|
|
71
|
+
description,
|
|
72
|
+
main: './cjs/index.js',
|
|
73
|
+
module: './esm/index.js',
|
|
74
|
+
types: './types/index.d.ts',
|
|
75
|
+
...packageJson,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
delete packageJson.type
|
|
79
|
+
|
|
80
|
+
fs.writeFileSync(path.join(process.cwd(), args.outdir, '/package.json'), JSON.stringify(packageJson, null, 2));
|
|
81
|
+
|
|
82
|
+
fs.copyFileSync(path.join(process.cwd(), '/readme.md'), path.join(process.cwd(), args.outdir, `/readme.md`))
|
|
83
|
+
console.log('✅ Production build generated successfully! The package is ready for deployment.');
|
|
84
|
+
|
|
85
|
+
if (args.publish) {
|
|
86
|
+
console.log("Publishing the production build to the npm repository...")
|
|
87
|
+
execSync(`npm publish`, {
|
|
88
|
+
cwd: path.join(process.cwd(), args.outdir)
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
console.log(`To publish your package:\n1. Navigate to the ${args.outdir} directory:\ncd ./${args.outdir}\n2. Publish the package to npm:\nnpm publish\nYour package is ready to share with the world! 🚀`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
113
95
|
export default pack
|
|
@@ -1,107 +1,97 @@
|
|
|
1
|
-
import inquirer from 'inquirer'
|
|
2
|
-
import fs from 'fs-extra'
|
|
3
|
-
import path from 'path'
|
|
4
|
-
import { createServer as createViteServer } from 'vite';
|
|
5
|
-
import express from 'express';
|
|
6
|
-
import { glob } from 'glob'
|
|
7
|
-
import { logger, loadConfig } from '../../helpers.js'
|
|
8
|
-
import chalk from 'chalk';
|
|
9
|
-
import figlet from 'figlet';
|
|
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
|
-
let template = `
|
|
38
|
-
<!doctype html>
|
|
39
|
-
<html lang="en">
|
|
40
|
-
<head>
|
|
41
|
-
<meta charset="UTF-8" />
|
|
42
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
43
|
-
</head>
|
|
44
|
-
<body>
|
|
45
|
-
<div id="root"></div>
|
|
46
|
-
<script type="module" src="${args.root}"></script>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
logger.success(`Server is running on ${chalk.blue(chalk.underline(`http://localhost:${args.port}`))}`);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
app.use((err, req, res, next) => {
|
|
102
|
-
logger.error(`Unhandled Error: ${err.message}`);
|
|
103
|
-
res.status(500).send('Internal Server Error');
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
1
|
+
import inquirer from 'inquirer'
|
|
2
|
+
import fs from 'fs-extra'
|
|
3
|
+
import path from 'path'
|
|
4
|
+
import { createServer as createViteServer } from 'vite';
|
|
5
|
+
import express from 'express';
|
|
6
|
+
import { glob } from 'glob'
|
|
7
|
+
import { logger, loadConfig } from '../../helpers.js'
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import figlet from 'figlet';
|
|
10
|
+
|
|
11
|
+
const app = express();
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const serve = async (args) => {
|
|
16
|
+
if (args.root === undefined) {
|
|
17
|
+
const serveFile = await glob('serve.{ts,js,tsx,jsx}', {
|
|
18
|
+
cwd: process.cwd()
|
|
19
|
+
})
|
|
20
|
+
if (!serveFile.length) {
|
|
21
|
+
let { root } = await inquirer.prompt([{
|
|
22
|
+
type: 'input',
|
|
23
|
+
name: 'root',
|
|
24
|
+
message: 'Enter the root file',
|
|
25
|
+
}]);
|
|
26
|
+
|
|
27
|
+
if (!fs.existsSync(path.join(process.cwd(), root))) {
|
|
28
|
+
throw new Error(`invalid root: ${root}`);
|
|
29
|
+
}
|
|
30
|
+
args.root = root;
|
|
31
|
+
} else {
|
|
32
|
+
args.root = serveFile[0];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
let template = `
|
|
38
|
+
<!doctype html>
|
|
39
|
+
<html lang="en">
|
|
40
|
+
<head>
|
|
41
|
+
<meta charset="UTF-8" />
|
|
42
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<div id="root"></div>
|
|
46
|
+
<script type="module" src="${args.root}"></script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
let config = await loadConfig(args)
|
|
52
|
+
let serveConfig = config.serve || {}
|
|
53
|
+
let viteConfig = serveConfig.vite || {}
|
|
54
|
+
let express = serveConfig.express
|
|
55
|
+
|
|
56
|
+
const vite = await createViteServer(viteConfig);
|
|
57
|
+
app.use(vite.middlewares);
|
|
58
|
+
|
|
59
|
+
if (express) {
|
|
60
|
+
express(app)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
app.get('*', async (req, res, next) => {
|
|
64
|
+
const url = req.originalUrl;
|
|
65
|
+
try {
|
|
66
|
+
template = await vite.transformIndexHtml(url, template);
|
|
67
|
+
res.status(200).set({
|
|
68
|
+
'Content-Type': 'text/html'
|
|
69
|
+
}).end(template);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
vite.ssrFixStacktrace(e);
|
|
72
|
+
next(e);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
let server = app.listen(args.port, () => {
|
|
77
|
+
figlet("Make Pack", function (err, data) {
|
|
78
|
+
if (err) {
|
|
79
|
+
console.log("Something went wrong...");
|
|
80
|
+
console.dir(err);
|
|
81
|
+
server.close(() => {
|
|
82
|
+
console.log('Server has been stopped.');
|
|
83
|
+
});
|
|
84
|
+
process.exit()
|
|
85
|
+
}
|
|
86
|
+
console.log(data);
|
|
87
|
+
logger.success(`Server is running on ${chalk.blue(chalk.underline(`http://localhost:${args.port}`))}`);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
app.use((err, req, res, next) => {
|
|
92
|
+
logger.error(`Unhandled Error: ${err.message}`);
|
|
93
|
+
res.status(500).send('Internal Server Error');
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
107
97
|
export default serve
|