Skip to content

Commit

Permalink
feat: add static file server for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Dec 17, 2022
1 parent 539f2cf commit 40eb3ef
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dist/
dist-transpiled/
temp/
generated/
public/
storybook/
storybook-static/

Expand Down Expand Up @@ -104,6 +103,7 @@ packages/**/LICENSE
packages/components/loader/
packages/components/lib/
packages/components/www/
packages/components/public/
packages/components/.storybook/vue/components.ts
packages/components/.storybook/vue/components
packages/components/src/assets/fonts
Expand Down
2 changes: 2 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const morgan = require('morgan')
const cors = require('cors')
const compression = require('compression')
const helmet = require('helmet')
const path = require('path')

app.use(cors())
app.use(compression())
Expand All @@ -15,6 +16,7 @@ app.get('/api*', (req, res) => {
console.log('__dirname', __dirname)
return handler(req, res, {
unlisted: ['index.js', 'ping.js'],
public: path.join(__dirname, '..'),
})
})

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/assets/fonts/BaloiseCreateText-bold.woff
Binary file not shown.
Binary file added public/assets/fonts/BaloiseCreateText-bold.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"rewrites": [{ "source": "/api/(.*)", "destination": "/api" }]
"rewrites": [{ "source": "/api/(.*)", "destination": "/api" }],
"public": true
}

0 comments on commit 40eb3ef

Please sign in to comment.