Skip to content
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

[sdk-v2] add NuxtJS example #233

Open
wants to merge 3 commits into
base: main
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
27 changes: 27 additions & 0 deletions examples/typescript/nuxt-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example

# Spin dev/build outputs
.spin
37 changes: 37 additions & 0 deletions examples/typescript/nuxt-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Local development

Make sure to install the dependencies:

```bash
npm install
```

Start the development server on `http://localhost:3000`:

```bash
npm run dev
```

## Production

Build the application for production:

```bash
spin build
```

Locally preview production build:

```bash
npm run preview
```

Serve the production build:

```bash
spin up
```
5 changes: 5 additions & 0 deletions examples/typescript/nuxt-app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
<NuxtPage />
</div>
</template>
7 changes: 7 additions & 0 deletions examples/typescript/nuxt-app/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
nitro: {
preset: './spin'
}
})
Loading
Loading