Problem with SPA under NodeJS

Thanks for the reply @ben, but I did not really follow what you mean by root directory.
The application is inside the ‘/app’ folder as we were discussing in the other thread.
I am seeing this happening in both local server and cPanel.
Can you please explain a bit more what I should update in place of "/"?

Sorry Siddhant, my previous reply was barking up the wrong tree. Please forget.

Looking at the online site I see:

When I then select Services, I get:

When I then view the source code, I see the error message. So something is wrong - which is exactly what you are saying.

I am wondering, are you following this tutorial?

No. Not the layout thing. I am trying to create SPA. So as you had suggested in another post, I have added static/html pages and setup routes like I would in PHP model app - main index route… Then add dmx-route to it, creating SPA.

This is the post where you helped with creating SPA with NodeJS in Wappler: Setup SPA in NodeJS Project

@patrick / @George Can someone please help with this?

Currently the NodeJS uses partials and content pages for its routing. For SPA’s we need to add more support as stated in:

That was 2 months ago. Any plans to do it in recent future updates?

@George Awaiting your reply.

1 Like

@George Was there a fix for this in version 3.3?

1 Like

Please guys check:

5 Likes

Hello Ben, please can you advice me here.
OS Windows 10
Wappler Ver 3.5.2
NodeJS.
Issue:
Is this normal. Each time i view a content page in the browser, all the head section of the content path automatically takes the path of the last view content page

Unfortunately, i never received a response on this, only an acknowledgement from Teodor. I guess i might have crossed the line by asking for clarification, seems i am the only one swimming in this ocean. I therefore rest my case and speak no more. Thank you and have a merry merry Xmas to the wonderful team of Wappler.

Some times issues or questions fall through the cracks. You need to stay on top of your forum topics and insist :slight_smile:

I can’t do much to help right now as I am nowhere near my laptop but someone will step up :slight_smile:

Merry xmas.

Did you attempt what I suggested when you asked me to review this directly? What was the result?

As a reminder: Perhaps you created these before Wappler was properly managing SPA structure. In a typical setup, the ac:route meta tag will be unique for each page, and normally is generated the first time you save the page. You can try to remove that entire line of code, and then save the page again to see if it generates the proper route.

Thank Ken,
I actually tried your tips, delete the …meta name=“ac:route” content="/xxxxxx"…when i saved the content page, it was re-created normally, i.e. having the right tag for the content, but when i used the browser and navigate to another page within the template, the content (route) address will now over-write all the route of the currently opened pages. This is running on my local server not uploaded.

What you are describing is extremely odd. Can you create a video of the steps you are taking and show us what is happening?

Thanks for looking at this.
Best
Banky

Very strange (at least to me.) I can see your route change when coming back into Wappler. I’m afraid I’m just not spotting anything wrong with the setup. I’ve tried to replicate the problem, but everything works for me.

If you haven’t tried yet, I’d create a fresh project and try to determine when the problem shows up.

1 Like

Thank you sir.
Banky