My First Playground

node v8.17.0
version: 4.0.0
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
const {connect,client} = require("postgre-sql"); connect({user:'jnpklagg',password:'80erFY8gaD7uqje5YvL1-AXEbaZr9nvd',host:'echo.db.elephantsql.com',database:'jnpklagg',max:2,idleTimeoutMillis:100}); let db = new client(); (async ()=>{ await db.connect(); let uid = await db.table('public.users').add({user_name:Math.random().toString(36).substr(2),password:Math.random().toString(36).substr(2)}); console.log('uid',uid); let u = await db.table('public.users').order('uid desc').field('uid,user_name,password,create_at').find(); console.log('user',u); await db.release(); })();
Loading…

no comments

    sign in to comment