Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/normalhuman01/scrap_clients
https://github.com/normalhuman01/scrap_clients
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/normalhuman01/scrap_clients
- Owner: normalhuman01
- License: mit
- Created: 2023-12-11T23:56:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-11T23:57:53.000Z (about 1 year ago)
- Last Synced: 2023-12-12T23:38:09.949Z (about 1 year ago)
- Language: TypeScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# How to works
### Types
```typescript
type Base64String = string;type RequestBody = {
url: string;
};type RequestBody = ResponseBodyData | ResponseBodyError;
type ResponseBodyData = {
data: {
image: Base64String;
title: string;
description: string;
url: string;
};
error: null;
};
type ResponseBodyError = {
data: null;
error: "Error in runtime";
};
```### Example
`curl http://localhost:3030/ \
-X POST \
-d '{"url":"https://lichess.org/"}' \
-H "Content-Type: application/json"````
{
"data": {
"image": "data:image/png;base64,iVBO....uCC"
"title": string;
"description": string;
"url": string;
},
"error": null;
}
```### How to run
1. Run "npm install", "yarn install" or "pnpm install"
2. Copy .env.example to .env
3. Edit .env
4. Run "npm run dev"Note: Please add to .gitignore the files added by npm, yarn or pnpm