spsystem
v0.0.2
Published
- 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? ```js const pb = require('spsystem') const client = new pb.client() // mongo
Downloads
3
Maintainers
Readme
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?
- Join our Discord Server