I'm exploring and testing nodejs with a html, css and javascript.
When i run index.html locally (no webserver) I can see the css,js,html,images render properly on my browser.
The problem when I create server.js and browse localhost:8000/index.html, it just return my heading and paragraph... no nice images, css, js execute...
I have gone through from SO and due to calling is only on html file but not css/js/images.
I don't know what's the problem, and how to proceed further.
This is my server.js:
var express = require('express');
var connect = require('connect');
var http = require('http');
var path = "";
var app = connect().use(express.static(__dirname + path));
http.createServer(app).listen(8000);
This is my index.html:
TEST NODEJS WEBMy First Heading
My first paragraph.
This is folder structure in my machine:
home
xero
next
js/next.min.js
css/next.min.css
myweb
index.html
topology_data.js
action-panel.js
topology.js
main.js
server.js
When i browse index.html..only can see 'My First Heading' and 'My first paragraph.'
Please help and advise me further. Thank you.
Thanks to all