How to use Express server back end with Nuxt JS - express

I just started working with Nuxt JS, and I'm trying to pass a request from the client to my Express server, but Nuxt treats the routes like they were suppose to be pages.
Hence I get the errors page not found in pages folder. Help please.

I've gotten into using an express backend with nuxt and it's a great way to go about it. As there is quite a lot steps to take and files to set up it's perhaps beyond the scope of a single answer here to cover what's needed. I'd recommend you start with this tutorial on codeburst which covers all the steps you need and can be expanded upon easily once you understand it. Good luck.

Related

Make nconf (or other) config available to getServerSideProps... should I eject from nextjs cli?

First of all, I know that nextjs has support for .env files... and this is great.
However, I do not wish to write secrets to disk, ever, becuase they might wind up in a docker image in an amazon ecr repo and someday get read by a hacker... so I won't write them to a yaml or a .env file. This is our company policy: we integrate with hashicorp vault.
Now, my idea was to get these secrets, and store them in nconf. Nconf is just a memory-based storage engine for organizing config... nothing special. I had planned to eject from nextjs cli and use a custom express server (with typescript). Fine... I can do that. But it's a little bit of a pain because it seems like people aren't doing that as much as they did 3 years ago when I used nextjs last.
That is probably because they don't want to miss out on the automatic static rendering, and neither do I.
But basically what I want to do is to make a global variable available server-side in nextjs on every page: my nconf config. I want to run things on the server and not in the browser (no secrets in the browser).
For instance... what about middleware? Can I run middleware without setting up a custom express server and ejecting? I feel like we're going to need middleware at some point, we're make an enterprise app. So I'm kind of using nconf as a litmus test. But hey, if there's a good way to handle secrets, LMK.
Am I missing something in the nextjs docs? Are there events or hooks I can tap into? Or is the whole thing kind of "nextjs way or the highway?" Because in that case I will need to eject. (I grew up in Drupal, where there were tons of hooks and you could do what you needed to with the right hook.)
Thanks for your help.

Will integrating nuxt.js into our vue.js application require much overhaul?

I'm considering integrating nuxt.js into our vue.js application. I'm trying to figure out if it's feasible. By feasible, I mean how much of an overhaul would it require.
I understand that nuxt.js is more than just a pluggin. If it were a plugging, it would be super easy. You would just npm install and Vue.use(nuxt) and that's it. But as a framework, I understand that nuxt.js expects certain structures to be in place. For example, I know from https://hiswe.github.io/2018/12-vue-with-nuxt/ that nuxt expects a certain folder structure (/static, /page, /layouts...), but can these live side-by-side with the standard vue.js folders (/assets, /components, /views...) or do they have to be replaced? If side-by-side, then no overhauling of existing code (just add new folders). Otherwise, there could be quite a bit of work to overhaul the structure.
And if they can live side-by-side, would the nuxt folder supersede the vue.js folders (ex. would it no longer look for components in /components or /views and instead expect them to be in /pages)?
I also understand that nuxt router depends only on the folder/file structure in /pages rather than the router.js file that vue.js depends on. Does this mean router.js will no longer be used? Or will router.js still be used until we tell it not to (by removing certain routes from it, for example).
You don't need to answer the above questions (although it would be super useful if you did). I just provide them to give an example of the things I need to consider. The main question is: how much work is involved in overhauling a vue.js application when nuxt.js is being integrated.
To give some perspective of the size/complexity of our application, you can see it here:
https://www.bodecanada.com/
The source code is just under 600MB (compared to a startup vue.js application which is usually < 100MB). It includes a backend API that connects to a postgres database. We host it on AWS Lambda. We'd like to take advantage of the SSR abilities of nuxt.js but as I understand it, that requires a node.js server (not sure how easily that integrates with our Lambda instance).
^ Those are the specs. Just looking for a rough idea. Easy? Difficult? Thanks for any feedback.

Error deploying vue app using any type of deployment

I have only deployed a couple small apps before and I am still newer to deploying apps in general.
I created this app by following a course and have recently finished the project. The course did not provide instructions on how to deploy the app. I have used Firebase hosting a couple times and am also somewhat familiar with Heroku. Regardless, it all seems pretty straight forward after following documentation.
I first tried Firebase hosting since that is what I am most familiar with. Spent some time with that with no luck, then tried heroku, then netlify, then NOW. Every single one of them had issues without any real information on them.
NOW says deployement failed with no logs.
Firebase hosting doesn't seem to be logging any errors, it builds a blank page.
Netlify says page not found after deployment and Heroku was something similar.
I am 100% open to getting this simple app deployed using any approach at all (preferably the easiest one).
Since I am following documentation and there doesn't seem to be any errors being logged, I'm completely stumped and am not sure what to do.
I realize I might not be providing the most helpful information to solve this issue, although I do have my full repo here:
https://github.com/SIeep/austin-pizza
Would anyone be kind enough to look over my repo and see what the issue might be? Or even point me in the right direction?
Please let me know if I need to provide any additional information.
Thanks!
missing entry file or file path problem ?
Try to find out which stage the problem is at first.
Compare this and last successful Firebase Configuration(dependency path),
Compare this and the last build dist file (not detail code,just File structure)
compare webpack.config.js
(app can run well locally,so i think it wouldn't because of the problem with the app's own code)

Vue built a product to upload to the server

I'm building a web page for an event using bootstrap-vue (I started the projet with vue init bootstrap-vue/webpack my-project). I've used vue-build prod to compose and uploaded the whole folder to my server using filezilla. The problem is that the website is not fine, just a part of it is sawn.
Can you formulate the question differently? Its hard to find out what it is exactly you mean with
The problem is that the website is not fine, just a part of it is
sawn.
What does the console in your browser tell you? Vue has alot of debugging tools built in, so maybe you can post the console output, then we can tell a bit more..

Easiest Way To Move a Single Page DotNetNuke Page From Dev to Live?

We have a DotNetNuke installation that we have on a dev environment and we are setting it up on our live server now. Everything looks great and is working just fine that regard. We were wondering if it was possible that once a page has been updated or created on our dev server and we're happy with it, is there a simple and easy way to push that page to the live server?
Dev has it's own database.
Live has a different database to itself.
We have seen some programs like SQL Sync but we do not want to push all pages from dev to live because there might still be some pages being worked on when another one finishes so we must have a way to push individual pages instead of everything.
Thank you so much for any help!
you can use Exporting And Importing feature in dotnetnuke it allows you to export a single page or whole web site you can follow this links for helo
Page import export
Great article to look for