Skip to content

Commit 162b182

Browse files
committed
refactor(serve): add express serve, build the cra into express🎉
1 parent 0c4032c commit 162b182

File tree

151 files changed

+457
-101
lines changed

Some content is hidden

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

151 files changed

+457
-101
lines changed

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"CCSA"
4+
]
5+
}

README.md

+13-62

font-end/build/asset-manifest.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"files": {
3+
"main.css": "/static/css/main.afd7172b.chunk.css",
4+
"main.js": "/static/js/main.13cd56ba.chunk.js",
5+
"main.js.map": "/static/js/main.13cd56ba.chunk.js.map",
6+
"runtime-main.js": "/static/js/runtime-main.1096374c.js",
7+
"runtime-main.js.map": "/static/js/runtime-main.1096374c.js.map",
8+
"static/css/2.f341610f.chunk.css": "/static/css/2.f341610f.chunk.css",
9+
"static/js/2.ef6f0232.chunk.js": "/static/js/2.ef6f0232.chunk.js",
10+
"static/js/2.ef6f0232.chunk.js.map": "/static/js/2.ef6f0232.chunk.js.map",
11+
"index.html": "/index.html",
12+
"static/css/2.f341610f.chunk.css.map": "/static/css/2.f341610f.chunk.css.map",
13+
"static/css/main.afd7172b.chunk.css.map": "/static/css/main.afd7172b.chunk.css.map",
14+
"static/js/2.ef6f0232.chunk.js.LICENSE.txt": "/static/js/2.ef6f0232.chunk.js.LICENSE.txt"
15+
},
16+
"entrypoints": [
17+
"static/js/runtime-main.1096374c.js",
18+
"static/css/2.f341610f.chunk.css",
19+
"static/js/2.ef6f0232.chunk.js",
20+
"static/css/main.afd7172b.chunk.css",
21+
"static/js/main.13cd56ba.chunk.js"
22+
]
23+
}

font-end/build/assets/source/1/0.png

10.8 KB

font-end/build/assets/source/1/1.png

10.5 KB

font-end/build/assets/source/1/10.png

9.73 KB

font-end/build/assets/source/1/11.png

12.5 KB

font-end/build/assets/source/1/12.png

12 KB

font-end/build/assets/source/1/13.png

15.2 KB

font-end/build/assets/source/1/14.png

9.14 KB

font-end/build/assets/source/1/15.png

11.3 KB

font-end/build/assets/source/1/16.png

10.8 KB

font-end/build/assets/source/1/17.png

15.5 KB

font-end/build/assets/source/1/18.png

12.3 KB

font-end/build/assets/source/1/19.png

14.1 KB

font-end/build/assets/source/1/2.png

10.7 KB

font-end/build/assets/source/1/20.png

11.3 KB

font-end/build/assets/source/1/21.png

13.3 KB

font-end/build/assets/source/1/22.png

9.57 KB

font-end/build/assets/source/1/23.png

13.9 KB

font-end/build/assets/source/1/24.png

12.8 KB

font-end/build/assets/source/1/25.png

12.8 KB

font-end/build/assets/source/1/26.png

12.2 KB

font-end/build/assets/source/1/27.png

12.5 KB

font-end/build/assets/source/1/28.png

12.1 KB

font-end/build/assets/source/1/29.png

13.9 KB

font-end/build/assets/source/1/3.png

10.2 KB

font-end/build/assets/source/1/30.png

12.1 KB

font-end/build/assets/source/1/31.png

10.6 KB

font-end/build/assets/source/1/32.png

16 KB

font-end/build/assets/source/1/33.png

11.7 KB

font-end/build/assets/source/1/34.png

11.1 KB

font-end/build/assets/source/1/35.png

10.2 KB

font-end/build/assets/source/1/36.png

11.5 KB

font-end/build/assets/source/1/37.png

13.8 KB

font-end/build/assets/source/1/38.png

9 KB

font-end/build/assets/source/1/39.png

10.3 KB

font-end/build/assets/source/1/4.png

11.4 KB

font-end/build/assets/source/1/40.png

11.1 KB

font-end/build/assets/source/1/41.png

9.79 KB

font-end/build/assets/source/1/42.png

12.8 KB

font-end/build/assets/source/1/43.png

8.12 KB

font-end/build/assets/source/1/44.png

10.1 KB

font-end/build/assets/source/1/45.png

13.4 KB

font-end/build/assets/source/1/46.png

12.4 KB

font-end/build/assets/source/1/47.png

14.3 KB

font-end/build/assets/source/1/48.png

14.8 KB

font-end/build/assets/source/1/49.png

14.8 KB

font-end/build/assets/source/1/5.png

12.1 KB

font-end/build/assets/source/1/50.png

12.5 KB

font-end/build/assets/source/1/51.png

11.7 KB

font-end/build/assets/source/1/52.png

12.1 KB

font-end/build/assets/source/1/53.png

11.4 KB

font-end/build/assets/source/1/54.png

11 KB

font-end/build/assets/source/1/55.png

12.2 KB

font-end/build/assets/source/1/56.png

10.7 KB

font-end/build/assets/source/1/57.png

12.2 KB

font-end/build/assets/source/1/58.png

11.3 KB

font-end/build/assets/source/1/6.png

10.5 KB

font-end/build/assets/source/1/7.png

13.6 KB

font-end/build/assets/source/1/8.png

14.4 KB

font-end/build/assets/source/1/9.png

14.1 KB
14.9 KB
16.5 KB
10.7 KB
20.2 KB
19.1 KB
14.8 KB
20.1 KB
21.7 KB
17.9 KB
23.5 KB
20.4 KB
20.6 KB
19.8 KB
25.3 KB
27.9 KB
24.4 KB
24.9 KB
25.5 KB
18.2 KB
32.7 KB
20.2 KB
32.8 KB
27.6 KB
32.1 KB
27.3 KB
19.4 KB
20.2 KB
32.2 KB

font-end/build/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="/manifest.json"/><title>ccsa 汉字标注</title><link href="/static/css/2.f341610f.chunk.css" rel="stylesheet"><link href="/static/css/main.afd7172b.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,l,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)l=a[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var a=this.webpackJsonpccsa=this.webpackJsonpccsa||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var i=c;t()}([])</script><script src="/static/js/2.ef6f0232.chunk.js"></script><script src="/static/js/main.13cd56ba.chunk.js"></script></body></html>

font-end/build/manifest.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
],
6+
"start_url": ".",
7+
"display": "standalone",
8+
"theme_color": "#000000",
9+
"background_color": "#ffffff"
10+
}

font-end/build/robots.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

font-end/build/static/css/2.f341610f.chunk.css

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/css/2.f341610f.chunk.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/css/main.afd7172b.chunk.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/css/main.afd7172b.chunk.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/js/2.ef6f0232.chunk.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
object-assign
3+
(c) Sindre Sorhus
4+
@license MIT
5+
*/
6+
7+
/*!
8+
Copyright (c) 2017 Jed Watson.
9+
Licensed under the MIT License (MIT), see
10+
http://jedwatson.github.io/classnames
11+
*/
12+
13+
/** @license React v0.20.1
14+
* scheduler.production.min.js
15+
*
16+
* Copyright (c) Facebook, Inc. and its affiliates.
17+
*
18+
* This source code is licensed under the MIT license found in the
19+
* LICENSE file in the root directory of this source tree.
20+
*/
21+
22+
/** @license React v16.13.1
23+
* react-is.production.min.js
24+
*
25+
* Copyright (c) Facebook, Inc. and its affiliates.
26+
*
27+
* This source code is licensed under the MIT license found in the
28+
* LICENSE file in the root directory of this source tree.
29+
*/
30+
31+
/** @license React v17.0.1
32+
* react-dom.production.min.js
33+
*
34+
* Copyright (c) Facebook, Inc. and its affiliates.
35+
*
36+
* This source code is licensed under the MIT license found in the
37+
* LICENSE file in the root directory of this source tree.
38+
*/
39+
40+
/** @license React v17.0.1
41+
* react-is.production.min.js
42+
*
43+
* Copyright (c) Facebook, Inc. and its affiliates.
44+
*
45+
* This source code is licensed under the MIT license found in the
46+
* LICENSE file in the root directory of this source tree.
47+
*/
48+
49+
/** @license React v17.0.1
50+
* react-jsx-runtime.production.min.js
51+
*
52+
* Copyright (c) Facebook, Inc. and its affiliates.
53+
*
54+
* This source code is licensed under the MIT license found in the
55+
* LICENSE file in the root directory of this source tree.
56+
*/
57+
58+
/** @license React v17.0.1
59+
* react.production.min.js
60+
*
61+
* Copyright (c) Facebook, Inc. and its affiliates.
62+
*
63+
* This source code is licensed under the MIT license found in the
64+
* LICENSE file in the root directory of this source tree.
65+
*/

font-end/build/static/js/2.ef6f0232.chunk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/js/main.13cd56ba.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/js/main.13cd56ba.chunk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/js/runtime-main.1096374c.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/build/static/js/runtime-main.1096374c.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

font-end/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"@testing-library/user-event": "^12.1.10",
1010
"antd": "^4.13.0",
1111
"axios": "^0.21.1",
12-
"lodash": "^4.17.21",
1312
"react": "^17.0.1",
1413
"react-dom": "^17.0.1",
1514
"react-scripts": "4.0.3",
@@ -41,6 +40,7 @@
4140
]
4241
},
4342
"devDependencies": {
44-
"eslint-plugin-react-hooks": "^4.2.0"
43+
"eslint-plugin-react-hooks": "^4.2.0",
44+
"express": "^4.17.1"
4545
}
4646
}

font-end/server.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const express = require('express');
2+
const path = require('path');
3+
const app = express();
4+
5+
app.use(express.static(path.join(__dirname, '../font-end/build')));
6+
7+
app.get('/', function(req, res) {
8+
res.sendFile(path.join(__dirname, '../font-end/build', 'index.html'));
9+
});
10+
11+
app.listen(9000);

0 commit comments

Comments
 (0)