Super simple HTTP server using Fastify for testing purposes
pnpm install
with npm
npm install
pnpm start
with npm
npm run start
This will start the server on port 3000.
pnpm dev
with npm
npm run dev
This will start the server using nodemon, which will automatically restart the server whenever you make changes to the code.
In order to run with TLS support (HTTPS), all you need to do is to provide the path to your SSL certificate and key. you can do so by setting the environment variables SSL_CERT_PATH
and SSL_KEY_PATH
. you can also set them in a .env
file in the project root dir, and they'll be loaded automatically.
# .env
SSL_CERT_PATH=/path/to/your/fastify.crt
SSL_KEY_PATH=/path/to/your/fastify.key
MIT. See LICENSE for more details.