How do I deploy a GWT website without Google App Engine? Is it possible to use GitHub Pages? - web

The Issue
Hi, I made a GWT (Google Web Toolkit) website, but now that I am done, I'm not sure how to host the website.
The code is only client-side, so I'm not sure where the problem is.
I would be grateful for any advice on where and how to host a GWT website.
Here's the GWT app on GitHub: https://github.com/aryanka15/GWTCledgeTextParser
My attempt to use GitHub Pages: https://github.com/aryanka15/aryanka15.github.io
What I tried:
I tried using GitHub Pages, but it doesn't work, for some reason the JS file is not recognized by browsers or something like that.
The build Java with Ant Github Action doesn't work either.
I also tried using Google App Engine, but it is a very complicated process that I couldn't get working, and I would like to avoid it if possible.
Also, I used VSCode to develop the application, if that helps. I think that many of the Google App Engine plugins for IDE's like Eclipse are deprecated, but let me know if I'm wrong.
Thank you!

Nvm, I wasn't being very smart. I just had to change the html to index.html, make necessary adjustments in the js files, and added all the files inside war to GitHub with the same file structure.

Related

How to recover source code of Nodejs GAE project

I've an application which is deployed. I'd created simple get fetch services on cloud in a project and have deployed it. Unfortunately in confusion b/w the projects, I deleted the project. I can access the web service by fetching through urls but couldn't get the source code. Any help?
At the moment it's only possible to download Java, Python, PHP and Go application's source code.
What I can recommend you is to submit a Feature Request through this link asking for this feature also for Node.js. Also you may consider using Cloud Source Repositories, which is free and can help you mitigate this kind of issues in the future.

How to deploy Express app on surge.sh

I have Express app, and I have index.ejs file instead of index.html and I can't deply it on surge (page not found). I use 'surge' command in project directory and than I go to the domain where it was published but my project doesn't run there. How should I deploy it? Please help me, I need to do it right now
Surge.sh is for serving static files (html,css,media..etc). Since ejs is a server side rendering template engine it can't be served using surge.sh.
Note: You can upload node apps to Heroku for hosting.
Since you have learned express, you can also learn Svelte. its a React/Vue like framework that compiles everything into a simple html/css/js site that you can then deploy to your favorite static hoster like surge.sh or even github pages
You can't deploy the Nodejs website on surge.sh as these services do not support server-side rendering like handlebars, ejs or pug, etc.
Vercel, netlify also do not support templating engines. However, you can use openode.io as an alternative, or maybe digitlocean under their app platform.
You may want to try to bundle the project and then use surge to publish it. I am not aware of any tool that can do that for you automatically, it might require manual setting.
Check this article:
https://morioh.com/p/c6e73ed575bb

Node js plugin permissions

I create a web server with Sails.js, and want to allow third dev to create node.js plugins installable from a web page (store).
My problem is I don't want this plugin to require sails (or other critical modules) and have access to database and services and do what they want.
For example using fs and delete all files.
How can I do that ? I have no idea if node.js can lock some scripts on this own directory
I don't think that node expose some sandboxing functionality so when you load a js code into node that code can do what it want.
From your description yours plugins are more like browser javascript code so I think that you can use a headless browser to execute your code and retrieve the result. I've never tried it by myself but it should work. You just have to figure out how to pass parameters to plugin and get the result, also performance will be very bad because the headless browser is quite heavy. Try looking at
http://phantomjs.org/
Another solution is to run the plugins directly inside node but sanitizing the code before running. There are some projects like:
http://gf3.github.io/sandbox/
https://github.com/asvd/jailed
They can help you limiting the powers of the plugins.
Anyway are you sure about it ? in any major CMS platform that I've seen (wordpress, joomla, drupal, liferay ...) the platform's author trusts plugins authors and plugins can always do what they want.

AngularJS app packaging for autonomous application

I wrote an angularJS app (with nodeJS and ExpressJS as my server). My app is totally independent from the server (I used pouchDB for the data). I would like to create an app/package that can be run from a computer or tablet. How can I do that?
I'm sure there are already lot of questions/answers about this topic but I couldn't find the right solution so I apologize in advance!
Thanks
If you r looking for an full-stack framework, i can really recommend Ionic.
It is a framework, that contains it's own customizable ui-framework(build on sass bootstrap), it is build on cordova aka phonegap and makes it easy to deploy and test the code on android, ios, ... . It is also optimized for angularjs and offers for most functions a directive.
I really love it. I did write a blogpost in german: kkonstantin/ionic
Maybe take your existing frontend javascript code and make use of a css framework, to make it look great for all window sizes.
Like: Ratchet (build on bootstrap)
Then you just make use of Phonegap to deploy your html/css/javascript code to the plattforms.

using nodegit within angularjs app

I am building an app in AngularJS that needs to clone GitHub wikis attached to GitHub repos. The GitHub API does not have functionality to do anything with the GitHub wikis and GitHub support suggested I could use libgit2. With that in mind, I found nodegit.
So, now I have nodegit installed, and I made a basic javascript file out of the code example they have for Cloning a repository and reading a file. I have that file, called nodegit.js, working and by navigating to the folder containing it and typing
node ./nodegit.js
The script runs great and clones the repo into the temp folder.
Fantastic.
Now...how can I use this script in my angularjs app?
Is there a way to run a node script from angular?
Is there a way to use nodegit from angular itself?
Is there some other angular->github non-GitHub API script out there?
Any help greatly appreciated. I've gotten stuck on this one.
thank you,
Scott
Thanks shaunhusain. I ended up setting up an ExpressJS server via NodeJS and putting my code there and calling the ExpressJS server from my Angular app.
thanks, scott
Just wanted to add that I currently have a strong focus on getting the library running in the browser to address this use case. I'll update this comment once the code has landed. An issue to track the status is here:
https://github.com/nodegit/nodegit/issues/142

Resources