Skip to content

Commit

Permalink
Test commit to see if it works on vps
Browse files Browse the repository at this point in the history
  • Loading branch information
Shangaman committed Nov 4, 2022
1 parent 8779ec3 commit 33367dd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const express = require('express');
const fetch = require('node-fetch');

const app = express()
const port = 3000

fetch('http://127.0.0.1:51473/', {
method: 'POST',
headers: {
'content-type': 'text/plain;',
'Authorization': 'Basic ' + btoa('masternode_test:p')
},
body: '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": [] }'
}).then(res => res.text())
.then(text => console.log(text));

/*
fetch('https://google.com')
.then(res => res.text())
.then(text => console.log(text));
*/


app.get('/', (req, res) => {
res.send('Hello World!')
})

app.get('/porcodio', (req, res) => {
res.send('dio porco World!')
})

app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})

0 comments on commit 33367dd

Please sign in to comment.