How to deploy a Next.js App on AWS using nginx - javascript

I'm currently following a tutorial on youtube on how to deploy a react app on AWS. He's using gitbash and nginx to do it. The problem is that currently I'm using a prebuilt template from themefor*st and the app they made includes next.js in it. Using this template, when I try to do "
npm run build" it does not provide me with an index.html file inside the build folder which is what the Youtube video tutorial points to, to run the front end on the AWS. I'm new to hosting a website but I think the problem lies in the /etc/nginx/sites-available/default configuration for the location. I look up answers on the internet but couldn't find anything helpful, closest so far are this documentation which I do not understand
https://nextjs.org/docs/advanced-features/static-html-export
I need help and if there are any questions regarding the file, I will try my best to explain them! Thank you
Here's the link to the youtube video I referred to above
https://www.youtube.com/watch?v=rE8mJ1OYjmM

Related

react app published on github pages shows white screen

I have a React.js app, I built this simple meme generator app trying to learn web development (pretty new to the stuff) and am trying to host it using Github pages. I followed all the steps like installing the gh-pages with node and adding the url to the packages.json and adding the extra 2 lines of code for predeploy and deploy. I have the source for the github pages set to gh-pages. i get no errors when I run the command "npm run deploy" in terminal. But when I click the link I get a white screen. The console gives the error "Loading failed for the with source “https://z0onic.github.io/static/js/2.0b197680.chunk.js”. which is the first js file in the build directory. I searched pretty heavily and found other people who had a similar white screen issue but none of the answers helped. I have triple checked against these answers. Based on the error I'm getting I think its a build error but I don't know how to fix it or figure out exactly what is going wrong.
The github repository is at https://github.com/z0onic/meme-page and the link to the blank page that should be the hosted app is https://z0onic.github.io/meme-page/
when hosting locally through vs code with "npm start" command everything works fine.
Any help is appreciated I hope I'm not overlooking something silly but like I said I'm new to coding and still learning.
set the homepage in package.json to "https://<username>.github.io/<reponame>/" of course substituting things in <>

Electron vue app - using private repo to update app

I'm trying to use electron auto updater feature in my app. The publishing process works fine, I've configured my vue.config.js file correctly and inside a .env file I have my token stored. The problem is whith the bundled app, it will not open and will show a blank screen because to check for update it need the github token. I don't want to ship the token with the app source code and I don't have idea of how to solve this problem. Can anyone suggest me a reilable solution? I've read this old github issue but my vue electron app stop working if I obfuscate the code.

Deploying my web application built using MEAN stack on the web

I just know that my application isn't static.
I have used this github repository to build my application [https://github.com/jainishshah17/jainishshah.com][1]
It works perfect when i try on local host but I tried to deploy using AWS (Bitnami) and lots of other web hosting platforms but cant seem to find the right one working for me.
Can anyone tell me looking at the repository what would I need to host the app that I built?
Any help will be greatly appreciated.
For a simple MEAN stack App deployment, use Heroku.
Getting Started on Heroku with Node.js

How to run a Backbone js app?

I am very new to Backbone and MVC frameworks.I am learning backbone.js .
I have followed the tutorial http://code.tutsplus.com/tutorials/build-a-contacts-manager-using-backbonejs-part-1--net-24277
But i have no idea how to run it.I have really looked into many tutorials but i really couldn't find how to run this app!
This might be a very silly question and the solution might be very trivial to some of you,But i have no idea to how to run it!
I have downloaded the attachment http://cdn.tutsplus.com/net/uploads/legacy/1142_bb1/demo.zip
(from the same tutorial)
Now how do i host it on the server?
In case if someone is also facing the same issue :
Look at this question.
It tells how to serve a page on mac
In case the link is broken,here is the easiest solution from those answers
As of PHP 5.4.0, the CLI SAPI provides a built-in web server. More details >in the official PHP documentation:
1.Open terminal.
2.Navigate to the folder (directory) containing the file you want to serve.
3.php -S localhost:8080
4.Go to http://localhost:8080 in the browser.

Electron (Atom-Shell) Run unix command from link in page

I am trying to learn Electron (Atom-Shell) but I am finding it pretty tough to find documentation for it...
I am simply trying to figure out how to create a link with in index.html, and have it open a terminal window or run some sort of program.
I learn languages by learning specific tasks as I need them in a program, so that is why I am asking so then I can utilize the technique used in other ways in my programs.
Thank you for helping.
Well, essentially Electron is just a customised version of a Chromium browser that comes packaged with Nodejs and some really cool packages that basically allow you to run the custom browser as if it was a native platform application. Because of that creating an Electron app is very similar to creating a web-app that has a Nodejs back-end.
So to get started with a simple "Hello World!" app, you can just run the following npm...
npm install electron-prebuilt --save-dev
Once the npm is installed you'll need three files to run an Electron app.
A package.json file
A javascript file (default is main.js)
An html file (default is index.html)
See this GitHub repo for a quick copy/paste version of each and more detailed instructions: https://github.com/mafintosh/electron-prebuilt
after that you're ready to simply run your app...
$ electron .
Finally, one way to open a terminal window would be to use an onclick attribute in your html to trigger a child_process, found here, in a function.
That's it! You should be able to edit your html and javascript files as you would for any web-app, and take advantage of the added features that Electron provides.
I'd also check out these resources for more info:
A Quick Start intro to how Electron works -- https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md
The Atom discussion forum (Because Atom was built with Electron, and is made to be hackable, the community is quite active) -- https://discuss.atom.io/c/electron
A cool repo to keep up with the latest info. It includes links for apps that currently use Electron, tutorials, videos, and more --
https://github.com/sindresorhus/awesome-electron
I hope that helps!

Categories

Resources