Configuration - Wertik

Wertik Configuration

This is the configuration that wertik to work like a charm 💪.

Property Type Description Default Value
NameStringApp of your appWertik
dbDialectString[Database] The database system you want to use. We only support Mysql at the moment.mysql
mysqlOptions new Object Mysql database credentials..

	dbhost: "DATABASE_HOST",
builtinModules String Wertik provides these builtin modules. See Buil-in modules topic. user, auth, permission, role, rolePermission, userPermission, userRole, me[GRAPHQL]
frontendAppUrl string|url Url to your frontend app. http://localhost:8080/
context object Pass data to resolvers and rest api handlers.

	data: {
		// Your context in object
	createContext: function () {
		return {}
forceStartGraphqlServer new Boolean Allows starting Apollo graphql server on your end after wertik is initializes. Setting true will start server by Wertik. true
forceStartRestApiServer new Boolean Allows starting rest api server on your end after wertik is initializes. Setting true will start server by Wertik. true
ports object Define ports for Graphql and Rest API to run.

	graphql: 4000,
	restApi: 5000,
Sockets new object To enable realtime data transfer in your app.

  onClientConnected: (req, wss) => {},
  onMessageReceived: (message) => {},
  onClientDisconnect: (wss) => {}
modules Array Your custom modules See Custom modules topic.


These are the dependencies that wertik is using.

Package Name Version Used By
apollo-server ^2.8.2 GraphQL
apollo-server-express ^2.9.4 GraphQL to use with express
bcrypt-nodejs 0.0.3 For auth in password
body-parser ^1.18.3 Rest API
cors ^2.8.5 Rest API
express ^4.16.4 Built Rest API with it
faker ^4.1.0 To create seeds feature
graphql ^14.1.1 GraphQL library
graphql-fields ^2.0.3 Convert graphql query into object
handlebars ^4.4.3 Compile email templates
jsonwebtoken ^8.4.0 For generating web tokens in auth
lodash ^4.17.15 Helper functions
moment ^2.23.0 Date helper
mongoose ^5.7.5 MongoDB Active record
mongoose-paginate ^5.0.3 Allow pagination in MongoDB
morgan ^1.9.1 Logs for rest API calls
mysql2 ^1.6.4 Mysql Binding
nodemailer ^5.0.0 Email system
winston ^3.1.0 Logs