Skip to content

Commit 91feff5

Browse files
committedAug 16, 2024
init
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent a32f5b8 commit 91feff5

13 files changed

+2261
-73
lines changed
 

‎Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
test:
2+
npm test
3+
4+
.PHONY: test

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Getting Started with [Fastify-CLI](https://www.npmjs.com/package/fastify-cli)
2+
23
This project was bootstrapped with Fastify-CLI.
34

45
## Available Scripts

‎app.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
'use strict'
1+
import path from 'path'
2+
import AutoLoad from '@fastify/autoload'
3+
import { fileURLToPath } from 'url'
24

3-
const path = require('node:path')
4-
const AutoLoad = require('@fastify/autoload')
5+
const __filename = fileURLToPath(import.meta.url)
6+
const __dirname = path.dirname(__filename)
57

68
// Pass --options via CLI arguments in command to enable these options.
7-
const options = {}
9+
export const options = {}
810

9-
module.exports = async function (fastify, opts) {
11+
export default async function (fastify, opts) {
1012
// Place here your custom code!
1113

1214
// Do not touch the following lines
@@ -26,5 +28,3 @@ module.exports = async function (fastify, opts) {
2628
options: Object.assign({}, opts)
2729
})
2830
}
29-
30-
module.exports.options = options

0 commit comments

Comments
 (0)
Please sign in to comment.