I am trying to pass a variable url in form action but couldn't do so with the following code:
<form action="${url}/auth/login_student" method="POST">
....</form>
EDIT: And in script tag
<script>
export default {
data() {
return{
url: process.env.VUE_APP_URL
}
}
}
</script>
I am importing the URL from .env which is 2 folders above this file in hirerachy
but it is showing the process.env.VUE_APP_URL is undefined
My .env file code:
VUE_APP_URL=http://localhost:5000