I have a /src folder and Eleventy serves up the images into /_site folder.
On my localhost I'm using the image route: static/img/imagename.png and it works when loading onto the localhost.
However the image disappears when being deployed to Vercel. Wondering what the file route of my image should be.
I am creating a SPA (single page application) with vue-cli.
I run npm run build script then upload dist files in the public_html folder but didn't work
My hosting service uses direct admin as a web control panel.
I read the deployment guide but didn't help me
hosting service that I use works with Linux, PHP, and Apache
By default, Vue CLI assumes your app will be deployed at the root of a domain, e.g. https://www.my-app.com/. If your app is deployed at a sub-path, you will need to specify that sub-path using this option. For example, if your app is deployed at https://www.foobar.com/my-app/, set publicPath to '/my-app/'.
Read public_path guide
How can i run the index file? How can I serve it on github.
app:build Opening index.html over file:// won't work
You can host your app on firebase hosting.
Go to https://console.firebase.google.com , and create a project.
Download the firebase-tools and deploy your built files there.
Additionally, you can also use the cloud messaging from firestore in your app.
For localhost, you can use "serve" module.
I am teaching myself Worklight. I followed the Get Started guide provided by IBM (http://www.ibm.com/developerworks/mobile/worklight/getting-started.html).
Examples in the above site use relative path to link to a page or getting images. Is it possible to put a / (foreward slash) in front of each link to make it relative to the root folder? If possible, how can I configure my local worklight server so the links and images work on the app?
I have app set up as below directory structures in the /common/ directory. Many pages load shared header and menu on the page. When I use <a href="/app-pages/page1.html">' or <img src="/images/ImageName.png">, This causes 404. Not Found - http://localhost:10080/images/ImageName.png
home.html
/app-pages/page1.html
/app-pages/page2.html
/app-pages/sub-cat/pageA.html
/app-pages/sub-cat/pageB.html
/shared/header.html
/shared/menu.html
/images
/css/
/js/
/jqueryMobile
FYI, my dev environment is as below.
Windows 7
Eclipse Juno
Worklight 6.0
In a new Worklight application called "test", under the common folder you will have the following hierarchy:
css
images
js
test.html
In test.html, if I will add <src="images/icon.png"/> then once previewing the app the icon.png image located in the images folder will be displayed:
I see that you are also trying to use multiple pages in your app. Make sure to read the Building a multi-page application training module.
Right now, the directory of my module is defined as an IIS virtual directory and IIS serves the files.
I was wondering whether IntelliJ has an internal web server, which can serve the files, without the need for any third party. Eclipse does.
UPDATE: built-in web server is available in the recent IntelliJ IDEA versions (starting from 13). You can find more details in the blog (yes, this feature first appeared in WebStorm).
IntelliJ IDEA has no this feature, you need to install and use any third-party web server that can serve the content from the project folders.
A built-in HTTP preview server will be part of Intellij IDEA 13 and is already available in the EAP: http://youtrack.jetbrains.com/issue/WEB-7148
"All existing actions — preview in browser (pop-up over html file or menu action or
shortcut), open in browser and create/debug html file action now open file on built-in web
server
http://localhost:63342/<project name>/<file path relative to source or content root>"
In other words, right-click on an HTML page and select "Debug" or "Open in browser", and IDEA 13+ will serve up that page via port 63342.
Here's another super simple option, install Python: http://www.python.org/getit/
Then open a shell prompt, navigate to your root web folder (e.g. public) and run python -m SimpleHTTPServer - This starts an HTTP Service on port 8000.
Further reading should you need it: http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python
I've got mine running on Windows 7 but the above article still applies.
Another option is is create a PHP project that, starting with v 5.4.0 of PHP includes a built in web server. This page explains it all ...
http://www.jetbrains.com/idea/webhelp/php-built-in-web-server.html
IntelliJ IDEA has a built-in web server that can be used to preview and debug your application. Just watch this YouTube video or follow the steps below.
Option 1
You need to add new 'JavaScript Debug' configuration:
Click Add Configuration... or Edit Configurations... in the Navigation bar
Click button in the toolbar or press Alt + Insert to create a new configuration
Select JavaScript Debug under the Templates node in the tree view of run configurations
Fill in Name, URL, Browser and click [OK] to save the configuration
Use http://localhost:63342/YOUR-PROJECT-NAME/index.html for URL
Now you can run the configuration:
Click run or debug button in the Navigation bar (or use Shift + F10 / Shift + F9 hotkeys).
Option 2
Running web page in browser without creating a configuration. Refer to the related IntelliJ IDEA Help article.
In the editor, open the HTML file. This HTML file does not necessarily have to be the one that implements the starting page of the application.
Do one of the following:
Choose View | Open in Browser on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.
Hover your mouse pointer over the code to show the browser icons bar: . Click the icon that indicates the desired browser.
Result
Google Chrome browser with a demo web page served by the Intelij IDEA's built-in webserver:
One simple way is to create a NodeJS / Express project in IntelliJ that is your web server. You can then use it to serve your static web pages and any other web content. The NodeJS web server is very small and runs fast - noticeably faster than IIS and Apache. Best of all you can just hit the Run button in IntelliJ or WebStorm to start it up.
By default, a NodeJS / Express project includes a public/ directory that you can use to contain your static pages that you can then view from http://localhost:3000/
This explains the steps required to enable NodeJS in IntelliJ and includes links to other Node resources:
http://www.jetbrains.com/idea/webhelp/node-js.html
If you feel the need, you can reconfigure your NodeJS server using server side Javscript code. You can add SSL support or almost any other server side features you care to dream up. Just add NodeJS modules using the npm (Node Package Manager) command line tool included with the install. NPM Registry https://npmjs.org/ indexes all the available modules.
You can configure IntelliJ to use a lot of different application containers, but each of them must be downloaded and installed separately. I currently have mine configured to serve via jetty, like eclipse, and also tomcat, tc-server, jboss, and node.js. It's pretty easy to set up.