Skip to content

Added standalone and nuxt examples #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/content/1.getting-started/3.examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Examples
description: Example projects using tRPC Vue Query
---

## Example Projects

Here are some examples to help you get started with tRPC Vue Query:

- [Standalone NodeJS Example](https://github.com/falcondev-oss/trpc-vue-query/tree/master/examples/nodejs) - A basic example showing how to use tRPC Vue Query in a standalone Vue.js application. [Click here to download the example](http://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Ffalcondev-oss%2Ftrpc-vue-query%2Ftree%2Fmaster%2Fexamples%2Fnodejs)
- [Nuxt Example](https://github.com/falcondev-oss/trpc-vue-query/tree/master/examples/nuxt) - An example showing how to use tRPC Vue Query in a Nuxt.js application. [Click here to download the example](http://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Ffalcondev-oss%2Ftrpc-vue-query%2Ftree%2Fmaster%2Fexamples%2Fnuxt)
10 changes: 9 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ const ignores = {
export default (async () => {
const eslintConfig = await _eslintConfig({
nuxt: false,
tsconfigPath: ['./tsconfig.json', './test/tsconfig.json', './docs/tsconfig.json'],
tsconfigPath: [
'./tsconfig.json',
'./test/tsconfig.json',
'./docs/tsconfig.json',
'./examples/nuxt/tsconfig.json',
'./examples/nodejs/tsconfig.json',
'./examples/nodejs/tsconfig.app.json',
'./examples/nodejs/tsconfig.node.json',
],
})

return [...eslintConfig, ignores]
Expand Down
24 changes: 24 additions & 0 deletions examples/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
12 changes: 12 additions & 0 deletions examples/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install

```bash
npm i
```

# Run These Commands in Two Different Terminals

```bash
npm run server
npm run dev
```
11 changes: 11 additions & 0 deletions examples/nodejs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading