/util

some utilities and starter packages

Primary LanguageJavaScript

mongo-root

scripts for managing mongoDB

create new users

$ 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

update user information

$ 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

vue-express

start-up package for building Vue project on an Express server

  1. Install corresponding packages
$ npm i

# or

$ yarn
  1. 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
  }
}
  1. Start server
$ npm run watch

# or

$ yarn run watch

vue-electron

start-up package for building Electron application with Vue

  1. Install corresponding packages
$ npm i

# or

$ yarn
  1. Execute scripts

Build executable applications, the corresponding options could be added in OPTS

$ OPTS="[options]" npm run build:exe

Build web application

$ npm run build:web

Preview application in Electron

$ npm run preview

Start web development server

$ npm start