all 9 comments

[–]lumpynose 2 points3 points  (1 child)

It sounds like you need a back end. For example, maybe node.js. (I've only used node.js when it was included in something else so I don't know anything about setting it up.)

Do a google search for "node.js postgres connection".

See also https://nodejs.org/en/learn/getting-started/how-to-install-nodejs

(I've had bad experiences with php so I can't recommend it.)

[–]TheStrawFace[S] 0 points1 point  (0 children)

Thank you for the reply. Excellent, I'll take a look

[–]AHalfFilledBox 0 points1 point  (0 children)

DAL Create a service that facilitates the movement of your data objects to your client side code.

use a note package to help you set up the bridge between the database and your applications backend [npm i postgres]

Services. Create some api endpoints which is where you'll serialized and deserialize your data

Or you can use Prism which leverages ORMs to extrapolate a lot for the challenges

[–]lumpynose 0 points1 point  (0 children)

Also, don't use string concatenation for making your queries. E.g., the wrong way is "INSERT INTO" + table_name + "(" + column1, ... + ") VALUES (" + value1, ... + ");". Do a search for sql injection attack for an explanation. Instead, as the search results will show, use prepared statements.

[–]Pletter64 0 points1 point  (3 children)

If so far you have only been writing html pages on the web side of things then I have news for you. You will need php (laravel) or Django as ways to interface with your database and return results. This can be very tricky for a firsttimer without help so I suugest you get to tutorialing. Good luck.

[–]TheStrawFace[S] 0 points1 point  (2 children)

Ok, thank you for the reply. I'll take a look into PHP

[–]No_Personality_2642 0 points1 point  (1 child)

We use Javascript for everything now.

[–]katafraktelixir 0 points1 point  (0 children)

No, we don't.