Skip to content

Commit 9486e11

Browse files
committed
docs: add scripts to README [ci skip]
1 parent 8a29821 commit 9486e11

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,26 @@ Updates menu items.
297297
# install dependencies
298298
$ npm install
299299

300+
# initialize project
301+
$ cp sample.env .env
302+
$ vi .env # edit application config
303+
$ node scripts/db-init # initialize database
304+
300305
# serve with hot reload at localhost:3000
301306
$ npm run dev
302307

308+
# add a service
309+
$ node scripts/add-service
310+
311+
# deploy assets to Aliyun OSS (optional)
312+
$ node scripts/deploy-to-oss
313+
303314
# build for production and launch server
304315
$ npm run build
305316
$ npm run start
317+
318+
# update database schema
319+
$ node scripts/migrate-database
306320
```
307321

308322
Please do not run the content in `sql/migration` directly. Instead, use the script at `scripts/migrate-database`.

scripts/deploy-to-oss.js

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const consola = require('consola')
1616
const store = new OSS(cfg)
1717
const distDir = '.nuxt/dist/client'
1818
for (const file of await readdir(distDir)) {
19-
if (file.includes('idframe')) continue
2019
await store.put(path.join(process.env.ALI_OSS_ASSETS_PREFIX || '', file), path.join(distDir, file), {
2120
headers: { 'Cache-Control': 'public, max-age=31536000' },
2221
})

0 commit comments

Comments
 (0)