-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
139 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Kubernetes Deployment of ghcr.io/v3xlabs/ens-page:sha-422fabf exposing port 3000 over a service | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ens-page | ||
namespace: default | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
run: ens-page | ||
template: | ||
metadata: | ||
labels: | ||
run: ens-page | ||
spec: | ||
containers: | ||
- name: ens-page | ||
image: ghcr.io/v3xlabs/ens-page:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 3000 | ||
resources: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: ens-page | ||
namespace: default | ||
annotations: | ||
cert-manager.io/cluster-issuer: le-http | ||
spec: | ||
ingressClassName: traefik | ||
rules: | ||
- host: ens.page | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: ens-page | ||
port: | ||
number: 3000 | ||
tls: | ||
- hosts: | ||
- ens.page | ||
secretName: tls-ens-page-ingress-http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ens-page | ||
namespace: default | ||
spec: | ||
ports: | ||
- port: 3000 | ||
protocol: TCP | ||
targetPort: 3000 | ||
selector: | ||
run: ens-page | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
type WarpcastProfile = { | ||
fid: number; | ||
username: string; | ||
displayName: string; | ||
pfp: { | ||
url: string; | ||
verified: boolean; | ||
}; | ||
profile: { | ||
bio: { | ||
text: string; | ||
mentions: []; | ||
}; | ||
location: { | ||
placeId: string; | ||
description: string; | ||
}; | ||
}; | ||
followerCount: number; | ||
followingCount: number; | ||
activeOnFcNetwork: boolean; | ||
referrerUsername: string; | ||
viewerContext: { | ||
following: boolean; | ||
followedBy: boolean; | ||
canSendDirectCasts: boolean; | ||
hasUploadedInboxKeys: boolean; | ||
}; | ||
}; | ||
|
||
type WarpcastResponse = { | ||
result?: { | ||
user: WarpcastProfile; | ||
inviter: WarpcastProfile; | ||
inviterIsReferrer: boolean; | ||
collectionsOwned: []; | ||
}; | ||
}; | ||
|
||
export const useWarpcast = async (name: string): Promise<WarpcastResponse> => { | ||
try { | ||
const request = await fetch( | ||
`https://client.warpcast.com/v2/user-by-username?username=${name}` | ||
); | ||
|
||
const response: WarpcastResponse = await request.json(); | ||
|
||
return response; | ||
} catch { | ||
// | ||
} | ||
|
||
return { result: undefined }; | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.