/Dynamic-Mongoose-Schema

This is a demo repository which shows how to define mongoose schema at run time.

Primary LanguageJavaScript

Api Server

To run this code please follow below steps:

  1. Go to your local project directory via terminal.
  2. Run git clone git@github.com:wizspark/Api-Server.git.
  3. Install Latest NodeJS version.

    We are using ECMA6 fetures which are available into NodeJS 4+ version. I will prefer to use NVM for working into multiple NodeJS versions.

  4. Go to project directory with command cd Api-Server.
  5. Install all NodeJS/backend dependencies with command npm i.
  6. Install Bower globally with command npm i -g bower.
  7. Install all frontend dependencies with command bower install.
  8. Run node app command.
  9. Open http://localhost:8080/ URL into your favorite browser.

To access any common module global.apiServer.modules.test To access any schema global.getSchema()