Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/balazsorban44/nextjs-28921
https://github.com/balazsorban44/nextjs-28921
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/balazsorban44/nextjs-28921
- Owner: balazsorban44
- Created: 2022-02-28T15:01:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-02-28T15:01:22.000Z (over 2 years ago)
- Last Synced: 2024-10-04T16:41:32.729Z (about 1 month ago)
- Language: JavaScript
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Steps
1.
- Deploy this repository.
- Change `https://balazsorban-28921-balazsorban.vercel.app` with your domain.
- curl:
```sh
curl -i -X POST https://balazsorban-28921-balazsorban.vercel.app/api/event \
--data '{"name":"pageview","url":"http://dummy.site","domain":"dummy.site","screen_width":1666}'
```This will return 404 Not Found.
2.
- Comment out the `i18n` config in `next.config.js`
- redeploy
- curl:
```sh
curl -i -X POST https://balazsorban-28921-balazsorban.vercel.app/api/event \
--data '{"name":"pageview","url":"http://dummy.site","domain":"dummy.site","screen_width":1666}'
```This will return 202 Accepted, with an "ok" body.
## Notes:
`GET` works correctly even with `i18n` config: https://balazsorban-28921-balazsorban.vercel.app/js/index.js## Resources:
- https://plausible.io/docs/events-api