Multiple routes not working

I want multiple routes to work

Config

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: kube-ingress
  annotations:
    kubernetes.io/ingress.class: "traefik"
    traefik.frontend.rule.type: PathPrefixStrip
spec:
  rules:
  - host: localhost
    http:
      paths:
      - path: /
        backend:
          serviceName: microservice-frontend
          servicePort: 8080
      - path: /api
        backend:
          serviceName: microservice-backend
          servicePort: 8081

In my frontend service I serve files currently it only serves the index page /index.js does not work however /api/hello works ideally I'd have something like

Entrypoint /api then have a bunch of URL endpoints say /foo /bar etc. Is there a way I can do this?

Link to the GitHub repository: https://github.com/jesterornot/minimal-microservice