@flinj/client

1.1.0 • Public • Published

@flinj/client

🚧 This project is still in development. You should use it with caution.

The fasest way to build REST API

Flinching

Prerequisite

Install @flinj/server on your server

Installation

npm i @flinj/client

navigate to your client directory and run

npx flinj ../relative/path/to/backend/controllers

Remember Everytime you create new controller on your server you need to run the command above

Usage

import { createClient } from '@flinj/client';

export const client = createClient({
	baseURL: '/api',
	headers: {
		authorization: `Bearer ${process.env.API_KEY}`,
	},
});

const user = await client.users.POST({
	name: 'Israel',
	email: 'test@gmail.com',
	password: '123456',
});

TODO

  • [x] support multi request params
  • [x] adjust to work with the new changes of @flinj/server

Package Sidebar

Install

npm i @flinj/client

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

6.66 kB

Total Files

4

Last publish

Collaborators

  • lachero