/    Sign up×
Community /Pin to ProfileBookmark

How to configure lite-server for index.html in sub-folder

Hi,

I’ve set up lite-server as a web server for testing on my machine locally,
and I’m trying to get it to load index.html (along with my .js and .css)
from a sub-folder off of my root.

This is my ts-config.json file:

{
“port”: 3000,
“files” : [ “./SEC010/*.{js, html}” ],
“open” : “/SEC010/index.html”,
“server”: {
“baseDir”: “./”
},
“http” : true,
“browser”: [“chrome”]
}

If I change baseDir to ./SEC010, it will load the index.html from there,
but will not be able to access the node_modules folder off of my root.

Can anyone suggest the proper change to my ts-config to accomplish this?

I am also open to switching to another local web server for this (such as live-server), so long as I have an idea as to how to configure it.

THANKS!

to post a comment

0Be the first to comment 😎

×

Success!

Help @wally231 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...