Is it possible to open for example facebook.com page in browsersync? - browser-sync

I need to open one page on multiple devices, but I'm not developer (I don't have project of the site) and I want use existing page like facebook.com. Is it possible with browsersync?

You are able to open any webadress on the web.
You have to have installed 2 main things though.
You have to have installed Node. Here is a good working guide. How
to install npm and node
You have to install browser-sync on your
machine like so:
npm install -g browser-sync
After you have everything installed you can run this command in terminal like so:
browser-sync start -p "https://facebook.com"
After running you should get a result like this one:
[BS] Proxying: https://facebook.com
[BS] Access URLs:
--------------------------------------
Local: https://localhost:3000
External: https://192.168.1.143:3000
--------------------------------------
UI: http://localhost:3001
UI External: http://192.168.1.143:3001

Related

NuxtJs deploying issue on plesk server

I host a domain on plesk server. It contain Nodejs V 12.4.0, I am not using anything like express or so.. I Just create nuxt app using create-nuxt-app in my pc using NodeJs V. 16, then run command npm run build, Then after I uploaded the files/folder(.nuxt, nuxt.config.js, static and package.json) on server to folder httpdoc/merostatus.com/(uploaded all files/folder here).
Setting on Nodejs in server:
Document Root : /httpdocs/merostatus.com/static
Application Mode : production
Application URL : http://merostatus.com
Application Root : /httpdocs/merostatus.com
Application Startup File : node_modules/nuxt/bin/nuxt.js
After this setting I click on NPM install button on Plesk and Restart App
But the output is not as desired. It is searching for pages folder, When I point Application Startup File to .nuxt/server.js It doesn't found vue instance.
My server is on live just now for addressing issue
https://merostatus.com
I am currently using Plesk VPS server with OS Ubuntu 20.04
I solved the issue by making change in following ways
Step 1: Added nuxt-start module : npm install --save nuxt-start
Step 2: Build the project : npm run build
Step 3: Upload project to server including all dependencies (Whole project not only .nuxt)
Step 4: Changing Setting on Nodejs in server:
Document Root: /httpdocs
Application Mode: production
Application URL: http://merostatus.com
Application Root: /httpdocs
Application Startup File: node_modules/nuxt-start/bin/nuxt-start.js
If you do have target: server (default), you indeed need to npm run build. The usual process is going through either npm run build or npm run generate (if target: static).
Then, uploading only your dist directory is enough. No need for any other files. Then, running npm run start (some platforms do this for you).
I'm not sure about your Plesk server configuration but you can try to build your app and drop the dist directory at Netlify, at least to see if it builds there: https://app.netlify.com/drop
Then, if you achieve this, we could look for Plesk.

How to run jhipster-registry from docker?

I'm new to jhipster, I'm trying to run jhipster-registry, but it seems I can not access it from my browser with this url:http://localhost:8761/
How did I install jhipster-registry in docker?
Install docker on mac.
docker pull jhipster/jhipster-registry
docker run jhipster/jhipster-registry
I could see everything run smoothly.
----------------------------------------------------------
Application 'jhipster-registry' is running! Access URLs:
Local: http://localhost:8761/
External: http://172.17.0.2:8761/
Profile(s): [composite, prod]
----------------------------------------------------------
2020-08-18 03:45:45.853 INFO 6 --- [ main] i.g.j.registry.JHipsterRegistryApp :
----------------------------------------------------------
Config Server: Connected to the JHipster Registry config server, using https://github.com/jhipster/jhipster-registry-sample-config !
access at http://localhost:8761/ but failed.
Any idea on this one?
In https://www.jhipster.tech/jhipster-registry/ you'll read "A docker-compose file to run this image is already present within each microservice src/main/docker directory". Did you try e.g. https://github.com/jhipster/jhipster-sample-app-microservice/blob/master/src/main/docker/jhipster-registry.yml - or your own?
It depends on the docker command you use to run the service. You must open the ports to the container.
If you just want to see the dashboard you can run this docker command
docker run -p 8761:8761 jhipster/jhipster-registry
After running this command you can type:
localhost:8761
in your browser, you should see the console.
If you want to connect the registry to other microservices, you need to set up a docker network overlay.
You can also use docker swarm or kubernetes for horizontal scaling (to make more replicas)

How do I add https to yarn run?

I am trying to run a yarn server with
$ yarn run start --https
which starts a server, but with http not https. The --https option works for another project that I was working on, but not this one. I was wondering if I need to set something in package.json as well to enable https. For reference, this is the github project that I cloned and am using: https://github.com/googlecreativelab/teachable-machine-boilerplate.
Explained on docs:
HTTPS=true npm start
or set it on scripts section of your package.json:
{
"start": "HTTPS=true react-scripts start"
}
The boilerplate uses a development server budo, so yarn start essentially runs budo dist. You can still pass options to it.
budo has no https option, but it does have an --ssl option for this purpose.
yarn start --ssl
I will answer because any of these answers don't work for me!
Its all copied of the internet, but doesn't works fine!
To run in HTTPS your react app follow the guide below:
First you don't need to put HTTPS=true in "start" tag, instead, you need in your VS Code terminal, for example, put set HTTPS=true
so, yarn start and it will run on https
This is the output running with https
Setting on "start" script tag occurs an error like "HTTPS' is not recognized as an internal or external command, so, I followed this way.
After that I installed my certificate generated with mkcert tool
While #Explosion Pills answer did create an SSL connection for localhost, there was a problem using my local IP. It turned out that I should have been using budo directly instead of yarn. I remedied this with:
npm install budo -g
And then running this to create the https server:
budo main.js --ssl
Hopefully my admission of naiveness can discretely help someone in the future!

Run angular 2/4 application permanently on live server

Hi i want to know that how to run angular application permanently. means if i run the npm start command on local server. then after it gives a url with port like localhost:4200. but when i close the terminal then my project not run.
Same thing happen with me on live server when i run my command through putty.
ng serve --host {ipadddress}. then it gives me a URL like mysiteip:4200. but when i close putty my site not run. i want to know that how to run angular application permanently.
You could just send process into background by adding &
You can use
forever start node_modules/#angular/cli/bin/ng serve --host {ip_address or domain} --prod
Reference - https://github.com/angular/angular-cli/issues/4951
Instead of this, You can build your app and just drop everything you got in dist folder of your angular app into the directory of the hosting platform.
I would recommend the screen command on linux/unix systems
screen
// New shell opens
ng serve --host {ipadddress}
// Now putty can be closed
This is a terminal that persists and can be continued.
screen -r
// Lists all active screen sessions
screen -r SCREEN_TTY_NO
But I would advise to not use this in a productive environment.

How to run `OpenFin Process Manager`

Refer to https://github.com/openfin/process-manager
Based on the README.md, I have done the following steps:
npm install
node server
I am able to see the following message from terminal(windows 7)
$ node server
Express server listening on port 5040
How do I launch the application?
I have tried to point to the localhost:5040 through chrome browser and ONLY see three tabs 'Processes', 'Cache', 'Logs' without any information.
How can I fix the issues?
npm i -g openfin-cli
openfin -l -c http://localhost:5040/app_local.json
The server script is running a local express server that hosts an OpenFin enriched web app so all you need to do it launch it on OpenFin, which in the case above we are doing with the CLI.
You can also use a node module to launch i.e. here

Resources