修改README.md

This commit is contained in:
周炽键 2021-07-26 18:54:33 +08:00
parent d5a6196d5b
commit 8077d249f6
6 changed files with 3780 additions and 1696 deletions

View File

@ -1,9 +1,16 @@
## 马威贸易面试任务
```shell
npm install # or
yarn
[Gitee](https://gitee.com/globus/interview-task-repositories)
```shell
npm install
npm run dev
# or
npm run build
npm run deploy
npm run serve # or
yarn serve
```

18
deploy Normal file
View File

@ -0,0 +1,18 @@
#!/bin/env node
const express = require('express')
const path = require('path')
const app = express()
app.use(express.static(path.resolve(__dirname, 'dist')))
app.use('/*', (req, res) => {
res.sendFile(path.resolve(__dirname, 'dist', 'index.html'))
})
const port = process.env.PORT || 80
app.listen(port, () => {
console.log(`http://0.0.0.0:${port}`)
})

1658
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,13 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview"
"serve": "vite preview",
"deploy":"cross-env PORT=4400 node deploy"
},
"dependencies": {
"cross-env": "^7.0.3",
"express": "^4.17.1",
"http-server": "^0.12.3",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},

7
start.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
npm install
npm run build
npm run deploy

3770
yarn.lock

File diff suppressed because it is too large Load Diff