修改README.md
This commit is contained in:
parent
d5a6196d5b
commit
8077d249f6
17
README.md
17
README.md
|
@ -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
|
||||
```
|
|
@ -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}`)
|
||||
})
|
File diff suppressed because it is too large
Load Diff
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
npm install
|
||||
|
||||
npm run build
|
||||
|
||||
npm run deploy
|
Loading…
Reference in New Issue