rlaurente / nobe

NOBackEnd - A framework that will convert a frontend dev to fullstack dev without any knowledge in backend tech / languages. The fast way to create an MVP app without any server setup / cost.
0 stars 0 forks source link

@rlaurente/nobe

NOBackEnd - The next level api mocking library for frontend developers. Data persistent mocking api for MVP apps rapid development.

Demo, Docs will be publish soon

Install

npm install @rlaurente/nobe

API

* [`init(...)`](#init) * [`switchBranch(...)`](#switchbranch) * [`get(...)`](#get) * [`set(...)`](#set) * [`request(...)`](#request) * [`mock(...)`](#mock) * [`apply()`](#apply) ### init(...) ```typescript init(options: { url: string; workspace?: string; branch?: string; wipe?: boolean; }) => Promise<{ is_success: boolean; }> ``` | Param | Type | | ------------- | ---------------------------------------------------------------------------------- | | **`options`** | { url: string; workspace?: string; branch?: string; wipe?: boolean; } | **Returns:** Promise<{ is_success: boolean; }> -------------------- ### switchBranch(...) ```typescript switchBranch(options: { branch_name: string; }) => Promise<{ is_success: boolean; }> ``` | Param | Type | | ------------- | ------------------------------------- | | **`options`** | { branch_name: string; } | **Returns:** Promise<{ is_success: boolean; }> -------------------- ### get(...) ```typescript get(options: { key: string; }) => Promise ``` | Param | Type | | ------------- | ----------------------------- | | **`options`** | { key: string; } | **Returns:** Promise<any> -------------------- ### set(...) ```typescript set(options: { key: string; data: any; }) => Promise ``` | Param | Type | | ------------- | ---------------------------------------- | | **`options`** | { key: string; data: any; } | **Returns:** Promise<boolean> -------------------- ### request(...) ```typescript request(options: { path: string; type: string; data?: any; headers?: any; }) => Promise ``` | Param | Type | | ------------- | ----------------------------------------------------------------------- | | **`options`** | { path: string; type: string; data?: any; headers?: any; } | **Returns:** Promise<any> -------------------- ### mock(...) ```typescript mock(options: { path: string; handler: any; }) => void ``` | Param | Type | | ------------- | -------------------------------------------- | | **`options`** | { path: string; handler: any; } | -------------------- ### apply() ```typescript apply() => Promise ``` **Returns:** Promise<boolean> --------------------