scripts for managing mongoDB
$ cd mongo-root/
# set information for new users
# -----------------------------
# user : (string) User name
# db : (string) Database that each user belonged to
# customData : (object) User information
# roles : (array) User roles
$ cp ./ref/new-users.js new-users.js
$ vi new-users.js
# execute mongoDB shell script
$ mongo admin create-user.js
$ cd mongo-root/
# set new information for existing user
# -------------------------------------
# user : (string) User name
# db : (string) Database that user belonged to
# update : (object) New information
$ cp ./ref/new-data.js new-data.js
$ vi new-data.js
# execute mongoDB shell script
$ mongo admin update-user.js
start-up package for building Vue project on an Express server
- Install corresponding packages
$ npm i
# or
$ yarn
- Create configuration file, option.json (not tracking this file on Git is recommended), and add fields like below:
{
"paths": {
"dist": "dist",
"src": "app"
},
"server": {
"host": "0.0.0.0",
"port": 3000
}
}
- Start server
$ npm run watch
# or
$ yarn run watch
start-up package for building Electron application with Vue
- Install corresponding packages
$ npm i
# or
$ yarn
- Execute scripts
Build executable applications, the corresponding options could be added in OPTS
$ OPTS="[options]" npm run build:exe
$ npm run build:web
$ npm run preview
$ npm start