spsystem

0.0.2 • Public • Published

SPS

  • SPS means Simple Profile system .A Simple Module to make Profile System for you with a rest api and can choose between 2 types of databases (sqlite or mongo)

How to use?

const pb = require('spsystem')
const client = new pb.client()
// mongo
client.settings(true , mongouri , /*Strict social links*/true)
//sqlite
client.settings(false , null , /*Strict social links*/true)
// output for strict links
client.output(console.log)
// all parms are optional other then id and if u want to keep it optional then write null
client.create(id , name , gender , age , status , occupation , avatar , ytlink , twitterlink , instalink)
//api
//default port = 3000
//default endpoint = api/data
// query = api/data?id=id_here
// final results http://localhost:port/endpoint
client.api(port, endpoint)
client.id(id to get data)
//some examples, see data parms below it
let name client.name()
let gender = client.gender()
console.log(name)
// data parms  name , gender , age , status , occupation , avatar , ytlink , twitterlink , instalink. example: console.log(client.name()) or let name = client.name
// like
// id1 = person who like
// id2 = person whom id1 likes
client.like(id1 , id2)
// dislike
// id1 = person who dislikes
// id2 = person whom id1 dislikes
client.dislike(id1 , id2)

Any Help needed?

Package Sidebar

Install

npm i spsystem

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

12.2 kB

Total Files

5

Last publish

Collaborators

  • jenil-dev