Welcome Guest, Not a member yet? Register   Sign In
Deploy CodeIgniter and VueJS applications under same virtualhost/hostname
#1

(This post was last modified: 08-19-2022, 06:00 AM by kabeza.)

Hi
I've a VueJS application that consumes a REST API built with CodeIgniter
This is the folder structure (d = folder)

d - ciapp (codeIgniter)
d - dist
d - node_modules
d - public
d - src
babel.config.js
jsconfig.json
package.json
package-lock.json
vue.config.js

When I compile the VueJS application, I execute "npm run build" and the dist folder is generated with the html, js, etc.
Vue cli deletes everything from that folder in each build

I have a VM called "testingserver" with Xampp (Apache and PHP) installed
I've configured an Apache virtualhost that points to: D:\Server\htdocs\vue\dist

When client loads browser
http://testingserver
the Vue app loads successfuly

1. I can't move-rename vue/ciapp/public (codeIgniter public folder) to vue/dist/ciapp because each build from VueJS cli deletes everything under dist
* vue-client can be configured not to erase dist in each build, but I'd like not to use this option

2. How could I configure Apache, or where can I put CodeIgniter's public folder so any client from LAN can run
http://testingserver/ciapp
and load the CodeIgniter application ?

VueJS = http://testingserver
CI = http://testingserver/ciapp

Thanks a lot for any tip/suggestion/idea you may have
Reply
#2

There is error in nodejs modules.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB