rwx-yxu / inventory

Inventory application that uses openfaas to deploy an api backend and vuejs front end.
0 stars 0 forks source link

Create frontend VueJS - landing page #4

Open rwx-yxu opened 2 years ago

rwx-yxu commented 2 years ago

I need to make the front end VueJS microservice to start consuming my API.

I will start to make the landing page for the inventory list as the API endpoints for that are done.

I want to look into using Tailwind CSS.

I also think that I might need to look at routing to serve different pages. VueJS is mainly for single-page applications which is not what I want

rwx-yxu commented 2 years ago

I think I may have to make a new dockerfile rather than use the nodejs template that is on the faas-cli store. This is because it is the same approach that is on the openfaas blog to make a react example. https://www.openfaas.com/blog/react-app/

rwx-yxu commented 2 years ago

I have created the initial commit for the frontend. I'll need to alter the Dockerfile. The build did fail which is expected on the publish step.

rwx-yxu commented 2 years ago

Getting this error when trying to build the docker image.

#17 0.851 > vite build
#17 0.851 
#17 0.855 sh: vite: not found
rwx-yxu commented 2 years ago

Looking through, the default scaffolding is using vite. I havent really found a way for it to play nicely with the dockerfile at the moment.

rwx-yxu commented 2 years ago

I was thinking. I could just not use the build tools with npm and use the node template to serve static files. I could reference the vuejs framework through a CDN instead. I wont be using server side rendering since I will just be making axois calls to the API anyways.

rwx-yxu commented 2 years ago

Setting to on hold.