Shopify Node connection between backend - frontend

Radixsecur1ty
New Member
2 0 1

Hello Guys.

 

 

I am really new in shopify app development.

 

I have an allready a working app what i have created with next.JS (I have worked with node/express too)

 

I just would like to create a connection between my frontend and backend with a simple endpoint.

 

It means i send a get request and i receive something nonsense. The main goal would be that is the backend can communicate with the frontend.

 

I have created a git repo too.: https://github.com/akospaska/shopify-outofthebox

 

The app has been created with shopify-cli

 

In my pages folder there is an index.js file, where my frontend "lives". 

 

I have created (or i think ) 2 differend endpoints.

 

1. pages/api/test   endpoint: "/test"

2. server/server.js  endpoint: "/test2"

 

When i call the endpoints i get an error. 

 

I have read the documentation but it just makes me confused.

 

How should i authenticate between my backend and frontend exactly?

 

Thank you for your help Huys in advance.

Replies 0 (0)