Skip to content

πŸ’ͺ A library that powers your app with GraphQL + Rest API

License

Notifications You must be signed in to change notification settings

waseembarcha/wertik-js

This branch is 272 commits behind Uconnect-Technologies/wertik-js:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

51a04fc Β· Jan 10, 2021
May 16, 2020
Jan 10, 2021
Nov 1, 2020
Jan 10, 2021
Apr 13, 2019
Jan 2, 2021
Oct 7, 2020
Jun 26, 2019
Jun 26, 2019
Oct 17, 2019
Jan 10, 2021
Dec 18, 2019
Apr 20, 2020
Dec 19, 2019
Jan 10, 2021
Jan 10, 2021
Jul 20, 2020

Repository files navigation

Wertik JS

Wertik is a πŸ’ͺ GraphQL + Rest API framework to build servers that gives you support for GraphQL, Rest Api, Emailing, Storage, Sockets and Cron Jobs feature.

Installation

To install you can use npm or yarn, To install with npm:


npm install --save wertik-js

Install with yarn


yarn add wertik-js --dev

Setting up server

Lets setup an app:

import { connectDatabase, serve } from "wertik-js";

import configuration from "./path/to/your/configuration";

connectDatabase(configuration.database)
  .then((databaseInstance) => {
    configuration.databaseInstance = databaseInstance;
    serve(configuration).then((wertikApp: any) => {
      wertikApp.database.sync();
    });
  })
  .catch((e) => {
    console.log(`Error connecting with database`);
    console.log(e);
  });

If everything goes fine, you will see:

βœ” [Wertik-js]: Socket.IO server running at http://localhost:5000
βœ” [Wertik-js]: Rest API server started at http://localhost:5000
βœ” [Wertik-js]: GraphQL Voyager running at http://localhost:5000/graphql-voyager
βœ” [Wertik-js]: GraphQL Server started at http://localhost:5000/graphql
βœ” [Wertik-js]: GraphQL Subscriptions are running at ws://localhost:5000/subscriptions
βœ” [Wertik-js]: Database: Successfully Connected!

Note: 5000 is the default port

The above code example is taken from: Dev Server Example

Further Steps

Now you have installed weritk-js in your app, now next step is to get familiar with the configuration to use. Let's go with the documentation flow:

  1. Configuration
  2. Database
  3. Rest Api
  4. GraphQL
  5. Mailer
  6. Sockets
  7. Storage
  8. Custom Modules
  9. Cron Jobs

The documentation is hosted at http://wapgee.com/wertik-js.

Versioning

Wertik-js follows semantic versioning (semver) principles. The version can be look like this, X.Y.Z,

  • Z When fixing bug we relase with chaning Z. For example: 1.2.1 to 1.2.2
  • Y When adding feature we release with changing Y, For example: 1.2.1 to 1.3.1
  • Z When adding breaking changes we made this release. For example: 1.2.1 to 2.2.1

Contributing

Pull Requests are welcome. If you think something is missing or needs to changed. Please open a pull request or new issue.

License

MIT

About

πŸ’ͺ A library that powers your app with GraphQL + Rest API

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%