node.js - Express js route handling -


in application i've set static folder in there 'index.html' file.

i want render file on route /profile

is possible?

yes can this. take @ following code.

var app=require('express')(); app.use("/profile", lib.express.static("./public")); 

here ./public original location of folder containing index.html file.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -