Reputation: 5298
I am trying to clone my stage environment onto my local machine that runs Coldfusion 2016 using built-in web server. For invoking components on stage, we use the following line of code.
The structure of the app is as follows
app
- Folder1
-cfc
- Folder2
- cfc
When I put the same app onto wwwroot, I get an error that the component does not exist, and it works when I use app.Folder1.cfc.test
Can I set a mapping in Coldfusion administration to avoid this? I tried using '/' as logical mapping to C:/Coldfusion2016/cfusion/wwwroot/app and it works but I have multiple apps that has same problem..And I end up updating the mapping everytime I want to run a different app. Any pointers on how to approach this would be great.
Upvotes: 3
Views: 2440
Reputation: 1124
With reference to your project's folder structure, it seems like app
is the root directory for your application.
And wwwroot
is the default root directory for ColdFusion server.
If you put the app
onto wwwroot
, and access the app using localhost:8500(built-in web server's default port), means definitely it'll give error, because, here your app
is not root directory, but wwwroot
.
Using built-in web server for multiple projects is not an ideal way. So instead of using, built-in web server for your project's local setup. You can do the following,
App
directory anywhere in your workstation, other than wwwroot
.app
directory in your web serverBy this way, we can create multiple virtual hosts for multiple projects with unique domain names.
So, without any problem or dependency we can work with multiple projects with their assigned domain name independently.
Upvotes: 2
Reputation: 780
Can you install a local copy of IIS? If so, I'd run through IIS using the ColdFusion Configuration tool to set up the platform for you. Also editing your hosts file to route a URL is handy.
So:
Its a bit of setup but this is usually how I configure my CF dev machines.
Upvotes: 1