Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: app.get is not a function #14

Open
milad777v2 opened this issue Dec 26, 2019 · 5 comments
Open

Uncaught TypeError: app.get is not a function #14

milad777v2 opened this issue Dec 26, 2019 · 5 comments

Comments

@milad777v2
Copy link

milad777v2 commented Dec 26, 2019

hi, whats this error?
app.get('/sitemap.xml', sitemapMiddleware());

@ludvig-flemmich
Copy link

I have the same issue.

@ShapesGraphicStudio
Copy link

Hi, I'm having the same issue, did you guys get this working?

@kagaramag
Copy link

Hello here, something new on this issue?

@panhaoyu
Copy link

Seems that this project is already abandoned? I have no idea about how to use it.

@BrianMwas
Copy link

Hi, You can use vue router middleware in the case of app.get('sitemap').
Let's say you have a router link like so..
`{
path: '/',
name: 'index',
component: Index,
}

// You can add a new meta field with middleware so it would be
{
path: '/',
name: 'index',
component: Index,
meta: {
middleware: sitemapMiddleware // This is a file in middleware folder in your src directory. As documented in this libs docs
},

,

Since you have generated a new sitemap.xml in your public directory. i.e so that it can be accessed anywhere like your favicon.ico
The sitemap.xml can be accessed using e.g localhost:8080/sitemap.xml. I hope this makes sense...

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants