Skip to content

Commit 05b2090

Browse files
docs(workspace): add GitHub templates and update samples docs (#2)
1 parent 3328bda commit 05b2090

27 files changed

+6251
-296
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 🐞 Bug Report
2+
description: This form is to report unexpected behaviors.
3+
labels: ['type: bug']
4+
body:
5+
- type: textarea
6+
id: current-behavior
7+
attributes:
8+
label: Current Behavior
9+
description: What is the behavior that currently you experience?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: expected-behavior
14+
attributes:
15+
label: Expected Behavior
16+
description: What is the behavior that you expect to happen?
17+
validations:
18+
required: true
19+
- type: input
20+
id: repo
21+
attributes:
22+
label: GitHub Repo
23+
description: |
24+
This is extremely important! If this issue is reproduce-able on https://github.com/prestodb/presto-js-client/tree/main/apps, you may use that as the repo.
25+
If not, please do take a few minutes of your time to create a repo to help us reproduce the issue.
26+
This is the best way to help us reproduce the issue and fix it as soon as possible.
27+
- type: textarea
28+
id: reproduction
29+
attributes:
30+
label: Steps to Reproduce
31+
description: Please provide some instructions to reproduce the issue in the repo provided above. Be as detailed as possible.
32+
value: |
33+
1.
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: additional
38+
attributes:
39+
label: Additional Information
40+
description: Is there any additional information that you can provide?
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: "📖 Documentation issue"
3+
about: Help improve our docs.
4+
labels: "type: docs"
5+
---
6+
7+
<!-- (Update "[ ]" to "[x]" to check a box) -->
8+
9+
- [ ] Reporting a typo
10+
- [ ] Reporting a documentation bug
11+
- [ ] Documentation improvement
12+
- [ ] Documentation feedback
13+
14+
### Is there a specific documentation page you are reporting?
15+
16+
Enter the URL or documentation section here.
17+
18+
### Additional context or description
19+
20+
Provide any additional details here as needed.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "\U0001F680 Feature Request"
3+
about: Suggest a new feature.
4+
labels: "type: feature"
5+
---
6+
7+
<!-- Please do your best to fill out all of the sections below! -->
8+
<!-- Use this issue type for concrete suggestions, otherwise, open a discussion type issue instead. -->
9+
10+
- [ ] I'd be willing to implement this feature
11+
12+
## Description
13+
<!-- What is the behavior that you would like to see introduced? -->
14+
15+
## Motivation
16+
<!-- Why do you believe this behavior would be beneficial? -->
17+
18+
## Suggested Implementation
19+
<!-- How do you imagine this might work? -->
20+
21+
## Alternate Implementations
22+
<!-- How else do you imagine this might work? -->

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Changes
2+
3+
Thanks for submitting a pull request 🙌
4+
5+
**Note:** Please don't create a pull request which has significant changes (i.e. adds new functionality or modifies existing one in a non-trivial way) without creating an issue first.
6+
7+
Try to limit the scope of your pull request and provide a general description of the changes. If this fixes an open issue, link to it in the following way: `Fixes #321`. New features and bug fixes should come with tests.
8+
9+
## Notes
10+
11+
None
12+
13+
## Screenshots
14+
15+
None

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ node_modules
1414
# Misc
1515
npm-debug.log
1616

17+
# Next.js
18+
.next
19+
1720
# System Files
1821
.DS_Store
1922
Thumbs.db
23+

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
/coverage
55
/dist
66

7-
# Semantic Release
8-
CHANGELOG.md
7+
# GitHub
8+
.github

apps/nest-server/README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1-
# nest-server
1+
# NestJS Application
22

3-
This application was generated with [Nx](https://nx.dev).
3+
This application was generated using [Nx](https://nx.dev).
44

5-
## Running
5+
## Running the Application
66

7-
First run `npm run presto:up` to run a local Presto using `docker-compose` and then `npm run serve nest-server` to serve the application.
7+
To run this application, follow these steps:
88

9-
Make a `GET` request to `http://localhost:3000/api/call-centers` to see the response from querying the local Presto using `prestodb-js-client` library.
9+
1. Start a local Presto instance using `docker-compose` by running the following command:
10+
11+
```bash
12+
npm run presto:up
13+
```
14+
15+
2. Once the Presto instance is up and running, you can start the Nest Server by running:
16+
17+
```bash
18+
npm run serve nest-server
19+
```
20+
21+
3. After starting the Nest Server, you can make a `GET` request to the following endpoint to see the response from querying the local Presto container using the `prestodb-js-client` library:
22+
23+
```
24+
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:3000/api/call-centers | json
25+
```
26+
27+
Output:
28+
29+
![Alt text](image.png)
30+
31+
Make sure you have all the necessary dependencies installed and configured before running the commands above.

apps/nest-server/image.png

49.8 KB
Loading

apps/nextjs/.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": ["plugin:@nx/react-typescript", "next", "next/core-web-vitals", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*", ".next/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.*"],
7+
"rules": {
8+
"@next/next/no-html-link-for-pages": "off"
9+
}
10+
},
11+
{
12+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
13+
"rules": {
14+
"@next/next/no-html-link-for-pages": ["error", "apps/nextjs/pages"]
15+
}
16+
},
17+
{
18+
"files": ["*.ts", "*.tsx"],
19+
"rules": {}
20+
},
21+
{
22+
"files": ["*.js", "*.jsx"],
23+
"rules": {}
24+
},
25+
{
26+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
27+
"env": {
28+
"jest": true
29+
}
30+
}
31+
]
32+
}

apps/nextjs/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Next.js Application
2+
3+
This application was generated with [Nx](https://nx.dev).
4+
5+
## Running the Application
6+
7+
To run this Next.js application, please follow these steps:
8+
9+
1. Start a local Presto instance using `docker-compose` by running the following command:
10+
11+
```bash
12+
npm run presto:up
13+
```
14+
15+
2. After the Presto instance is up and running, you can start the Next.js application by running:
16+
17+
```bash
18+
npm run serve nextjs
19+
```
20+
21+
3. Once the Next.js application is running, open your web browser and navigate to the following URL:
22+
23+
```
24+
http://localhost:4200/
25+
```
26+
27+
This will allow you to access the Next.js server-side rendered (SSR) application, which queries the local Presto container using the `prestodb-js-client` library.
28+
29+
Output:
30+
31+
![Alt text](image.png)
32+
33+
Make sure to ensure that all necessary dependencies are installed and properly configured before running the provided commands.

0 commit comments

Comments
 (0)