I am developing a node.js app at the moment. I plan to host in on heroku.
The catch is this app relies on a jar file, that i will have to run obviously.
Is this possible on heroku, to run java?
You'll need to add the JVM buildpack to your app:
$ heroku buildpacks:add -i 1 heroku/jvm
Then redeploy with:
$ git commit -m "Add JVM" --allow-empty
$ git push heroku master
After this, the java command will be available at runtime.
Related
Laravel Mix Version: 6.0.43
Node Version (node -v): 16.13.1
NPM Version (npm -v): 8.1.2
OS: Windows 10 21h2
Description:
THIS IS HAPPENING ON A FRESH NEW INSTALL OF LARAVEL AND MY OTHER PROJECTS
Running npm run hot changes the script tag sources to http://localhost:8080/*/*.* from http://localhost/*/*.* HOWEVER I always get net::ERR_EMPTY_RESPONSE from localhost:8080. The HMR server doesn't launch at all. The terminal output of the command also have no mention of spinning up a new web server.
PS C:\Users\Eric Wang\Documents\GitHub\test-laravel-mix> npm run hot
● Mix █████████████████████████ emitting (95%)
emit
● Mix █████████████████████████ done (99%) plugins
WebpackBar:done
✔ Mix
Compiled successfully in 5.51s
Laravel Mix v6.0.43
✔ Compiled Successfully in 5336ms
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤│ css/app.css │ 47.6 KiB │└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘webpack compiled successfully
Here's a picture of the browser failing to fetch the bundle files
Steps To Reproduce:
I am running Docker 4.5.1 using legacy Hyper-V.
I containerized Laravel and PHP BUT not the frontend and JS. I am running Laravel Mix on my main system.
Clone the fresh installation of Laravel from https://github.com/ericwang401/test-laravel-mix
Clone Laradock in the project folder using git clone https://github.com/laradock/laradock.git
CD to the Laradock folder and make .env file with cp .env.example .env
Inside .env file set PHP_VERSION to PHP_VERSION=8.0 AND DO NOT EDIT MYSQL SETTINGS
Now edit the Laravel environment file
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=default
DB_USERNAME=default
DB_PASSWORD=secret
Start up the Laravel app in Laradock folder using docker-compose up -d nginx mysql
Enter into bash mode in the Docker container docker-compose exec workspace bash
Install Composer dependencies BUT NOT NPM DEPENDENCIES YET composer i
Now exit out of the Docker container CNTRL + D
Install NPM dependencies in project root ON YOUR MAIN SYSTEM npm i
Run on your main system npm run hot
Now go to http://localhost and IT SHOULD be a white screen
Check console logs and it should give net::ERR_EMPTY_RESPONSE when it tries to fetch the bundle files
REMEMBER: the backend is running inside Docker
The frontend (Laravel Mix) is running on the host system
This issue is happening on a FRESH project installation of Laravel 9 + Jetstream AND it's also happening on my other older projects like https://github.com/StratumPanel/Stratum-Panel
The HMR server is simply not launching.
I found out the issue. The problem was that the default port, 8080, Laravel Mix HMR was using couldn't be binded to. Webpack Dev Server doesn't respond with a message of failing to bind to a port. To confirm this issue, I replicated the environment on my friend's PC and it too couldn't bind to port 8080, but this time it reported an error that the dev server couldn't bind to port 8080.
I fixed this issue by specifying
mix.options({
hmrOptions: {
host: 'localhost',
port: 4206
}
});
And it works! On both my friend's pc and my pc.
I used the exact same reproduction instructions on my friend's PC.
I spent way too long investigating this issue 😭
currently i want to deploy an app on Heroku and my app has 2 running commands like this:
the command npm run devStart is for my server and peerjs --port 3001 is for server API of PeerJs, now i want to deploy my app on Heroku, please give me a step by step guide to deploy it ( i am totally a newbie with heroku)
Thank you so much and have a good day :)
You can design an executable and put the two commands in it like this:
command 1
time.sleep()
command 2
And then assign the executable to the dyno worker(in heroku) by making a Procfile(file named Procfile) with the following line of code(assuming you named the executable file 'exec'):
worker: ./exec
We have deploy the MeteorJS code on Ubuntu server. We haven't created any client to access this MeteorJS service. First we wanted to verify the service are running properly. Can any one suggest the steps for check the deployment is correct.
We install Meteor on Ubuntu : curl https://install.meteor.com/ | sh
MonogoDB - Already install for NodeJS application - Its Working!
Copy the Code Meteor Code to server using WinSCP
Set the MongoDB path for Code : export MONGO_URL=mongodb://ip:27017/userDB
Run Command to start the app: sudo nohup meteor --port 3001 --production &
Thanks.
I have tested and completed a version of my app that uses Node.js and more specifically it incorporates the node twitter module. When following Heroku's deployment guide and I execute heroku git:clone -a groupmetweetbot I get the following output in the console:
If I continue on and execute the following:
$ cd groupmetweetbot
$ git add .
$ git commit -am "make it better"
$ git push heroku master
the console tells me that the app is deployed.
This leaves me with a few questions. How can I fic this filename too long issue? I can't find any easy answer on how to start and sleep my app on Heroku. Any help is greatly appreciated.
you're hitting this bug https://github.com/npm/npm/issues/3697
you could try using npm v3
So, I am a following a tutorial that uses angular seed to write my first angular application.
Angular seed comes with a web-server.js file that essentially runs a node server so you can emulate a web server. The tutorial calls for starting the server in the command prompt.
The issue is that every time I run the file for starting the Node server, Visual Studio 2013 opens and then eventually tells me that access has been denied. This is not the intended result.
Do I need to set up IIS for use with Node? Why is VS opening when I start a node web server from the command prompt??
At present .js files are configured to run with VS in your Windows.
http://nodejs.org/download/ - you need to Download and Install node.js for Windows and make sure node is in PATH and you can run it from windows prompt cmd.
C:\> node -v
v0.10.22
To run angular seed web server, simply run go to the web-script.js's directory and run the it with node:
cd angular-seed/scripts
node web-server.js