Skip to content
/ wrappid-service Public template

A service middleware boilerplate application to support frontend applications built using the Wrappid framework, which enables simultaneous development of web and mobile application

License

Notifications You must be signed in to change notification settings

wrappid/wrappid-service

Repository files navigation

Wrappid Service Boilerplate

                                    _     _
    __      ___ __ __ _ _ __  _ __ (_) __| |
    \ \ /\ / / '__/ _` | '_ \| '_ \| |/ _` |
     \ V  V /| | | (_| | |_) | |_) | | (_| |
      \_/\_/ |_|  \__,_| .__/| .__/|_|\__,_|
                       |_|   |_|

This is a template documentation, @wrappid/toolkit uses this template to create backend service boilerplate.

Table of Contents

1. Introduction

This is a service middleware boilerplate application to support frontend applications built using the wrappid framework, which enables simultaneous development of web and mobile application.

Getting Started

This getting started section will help you setup a basicservic middleware built using the Wrappid framework for Frontend Wrappid Projects. Follow the below steps to get going.

2.1 What are my Pre-requisites?
2.2. How to Create?
2.3. How to Setup?
2.4. How to Start?

2.1 What are my Pre-requisites?

  • Refer here
  • install @wrappid/toolkit globally. Click herefor installation guide of @wrappid/toolkit.

2.2. How to Create?

It is expected that you have successfully installed @wrappid/toolkit(wrappid framework's CLI tool) and initialised it. Run the below command to create Frontend Wrappid Project

wrappid init service <wrappid>

Output:
wrappid-service

2.3. How to Setup?

Note: If you want to setup a wrappid-service project that is already in your github, you need to clone it. After clonning, run npm i at the root of the project

Run the below command to setup a Backend Wrappid Project.

cd <wrappid>-<service>
wrappid setup

Note: Unlike wrappid frontend biolerplate(wrappid-app), there are no runtime environments for wrappid-service

2.4. How to Start?

Run the below command to start the development backend service:

cd wrappid-service
wrappid start

This should start your backend service middlewear at localhost:8080

3. What are Wrappid Environments?

Wrappid Service can be runned in 3 environments:

  • Dev: Suitable for Development
  • Stage: Suitable for Testing
  • Prod: Suitable for Production

By default, Wrappid Servoce project setups and starts in dev environment. These environments are to be configured in wrappid.conf.json located at the root of wrappid-app project

To run a Wrappid Servoce project in a different environment, run the below command:

cd wrappid-service
wrappid start --env=[dev|stage|prod]

4. What are Registries?

4.1 Controllers Registry

Used for controllers

4.2. Functions Registry

Used for functions

4.3. Middleweares Registry

Used for Middlewears functions

4.4. Models Registry

Used to get models

4.5. Tasks Registry

Used to get tasks

4.6 Validation Registry

Used for validation

4. Wrappid Packages

As of now 1 npm package is used by wrappid-service, i.e, 3.1. @wrappid/service-core

4.1. Wrappid Service-Core Package

About

A service middleware boilerplate application to support frontend applications built using the Wrappid framework, which enables simultaneous development of web and mobile application

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published