All Questions
Tagged with node-postgres reactjs
3 questions
2
votes
0answers
311 views
Importing pg in react-native code
Being new to react-native, I am trying connect postgreSQL from my react-native application. I have installed pg module using this npm install pg --save command on my react-native application. However, ...
5
votes
1answer
6k views
Webpack can not use __dirname?
I am trying to use node-postgres to hook my app up to Postgres. The code I use is:
import React from 'react';
import pg from 'pg';
import fs from 'fs';
var cn = {
host: 'localhost', // server name ...
9
votes
2answers
17k views
ECONNREFUSED when making GET request in app, but API returns JSON successfully
I'm writing a node app with React, using node-postgres and superagent for backend calls.
Let's say I'm making a GET request and using the JSON it returns to fill a table of students. My API looks like ...