Skip to content

Commit

Permalink
chore(examples): update hello-world
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 29, 2024
1 parent d8491cd commit 169ec57
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
7 changes: 7 additions & 0 deletions examples/hello-world/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.data
.nitro
.cache
.output
.env
3 changes: 3 additions & 0 deletions examples/hello-world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Nitro starter

Look at the [nitro quick start](https://nitro.unjs.io/guide#quick-start) to learn more how to get started.
5 changes: 4 additions & 1 deletion examples/hello-world/nitro.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export default defineNitroConfig({});
//https://nitro.unjs.io/config
export default defineNitroConfig({
srcDir: "server"
});
7 changes: 4 additions & 3 deletions examples/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "example-hello-world",
"private": true,
"type": "module",
"scripts": {
"build": "nitro build",
"dev": "nitro dev",
"build": "nitro build"
"prepare": "nitro prepare",
"preview": "node .output/server/index.mjs"
},
"devDependencies": {
"nitropack": "latest"
Expand Down
1 change: 0 additions & 1 deletion examples/hello-world/routes/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions examples/hello-world/server/routes/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default eventHandler((event) => {
return "Start by editing <code>server/routes/index.ts</code>.";
});
1 change: 1 addition & 0 deletions examples/hello-world/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://nitro.unjs.io/guide/typescript
{
"extends": "./.nitro/types/tsconfig.json"
}

0 comments on commit 169ec57

Please sign in to comment.