All Projects → smartiniOnGitHub → fastify-example

smartiniOnGitHub / fastify-example

Licence: Apache-2.0 license
Example webapp with Fastify

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
EJS
674 projects
Dockerfile
14818 projects
HTML
75241 projects

Projects that are alternatives of or similar to fastify-example

Play Scala Slick Example
Example Play Scala project with Slick
Stars: ✭ 59 (+227.78%)
Mutual labels:  example, webapp
Play Java Starter Example
Play starter project in Java (ideal for new users!)
Stars: ✭ 164 (+811.11%)
Mutual labels:  example, webapp
Play Java Websocket Example
Example Play Java application showing Websocket usage with Akka actors
Stars: ✭ 86 (+377.78%)
Mutual labels:  example, webapp
play-scala-secure-session-example
An example Play application showing encrypted session management
Stars: ✭ 54 (+200%)
Mutual labels:  example, webapp
play-java-rest-api-example
REST API using Play in Java
Stars: ✭ 44 (+144.44%)
Mutual labels:  example, webapp
Play Samples
Stars: ✭ 335 (+1761.11%)
Mutual labels:  example, webapp
Play Scala Isolated Slick Example
Example Play Slick Project
Stars: ✭ 155 (+761.11%)
Mutual labels:  example, webapp
Mean Stack Angular5 Crud
MEAN Stack (Angular 5) CRUD Web Application Example
Stars: ✭ 107 (+494.44%)
Mutual labels:  example, webapp
node-mock-examples
Examples of tests that mock Node system APIs: fs, http, child_process, timers
Stars: ✭ 38 (+111.11%)
Mutual labels:  test, example
Play Scala Starter Example
Play Scala Starter Template (ideal for new users!)
Stars: ✭ 238 (+1222.22%)
Mutual labels:  example, webapp
play-scala-anorm-example
Example Play Database Application using Anorm
Stars: ✭ 41 (+127.78%)
Mutual labels:  example, webapp
play-scala-streaming-example
Example Play application showing Comet and Server Sent Events in Scala
Stars: ✭ 42 (+133.33%)
Mutual labels:  example, webapp
play-java-ebean-example
Example Play application showing Java with Ebean
Stars: ✭ 54 (+200%)
Mutual labels:  example, webapp
Mean Angular5 Passport Authentication
Securing MEAN Stack (Angular 5) Web Application using Passport Authentication
Stars: ✭ 24 (+33.33%)
Mutual labels:  example, webapp
play-scala-chatroom-example
Play chatroom with Scala API
Stars: ✭ 43 (+138.89%)
Mutual labels:  example, webapp
Play Scala Websocket Example
Example Play Scala application showing WebSocket use with Akka actors
Stars: ✭ 194 (+977.78%)
Mutual labels:  example, webapp
spring-boot-mongodb-react-java-crud
Spring Boot, MongoDB and React.js CRUD Java Web Application Example
Stars: ✭ 33 (+83.33%)
Mutual labels:  example, webapp
NodeExpressCRUD
Node, Express, Mongoose and MongoDB CRUD Web Application
Stars: ✭ 45 (+150%)
Mutual labels:  example, webapp
flutter-animations
medium.com/flutter-jp/implicit-animation-b9d4b7358c28
Stars: ✭ 37 (+105.56%)
Mutual labels:  example
energy-use-case-trading-client
Energy Use Case Web UI for Lition Trading Platform
Stars: ✭ 23 (+27.78%)
Mutual labels:  webapp

fastify-example

Code Style Known Vulnerabilities Apache 2.0 License

Example webapp with Fastify

Setup and run

To complete project setup, do:

npm install

and run with

npm start

then point your browser to localhost:8000

Setup and run with Docker

Note that it's possible to let Docker do all inside a container, because all is described in a Dockerfile; see Dockerfile-usage for related commands.

Of course you need a local installation of Docker (recent, if possible latest), but nothing other.

Others

To run a development server (with hot reload enabled) instead execute this:

npm run start:dev

For other custom commands look the 'scripts' section inside 'package.json'.

Requirements

Fastify ^3.3.0, Node.js 12 LTS (12.13.0) or later.

Security

Nothing known.

Sources

Source code is all inside main repo: fastify-example.

Documentation generated from source code (API): here.

Note

Some features can be configured via environment variables; if a .env file is found in project root, all its contents will be loaded into environmental variables. Supported variables:

  • FASTIFY_OPTIONS, set Fastify main options at startup, as a JSON string; to change logging level for example use something like: `{ "logger": { "level": "debug" } }' and to remove logging for example use: '{ }'
  • HTTP_PORT, set default HTTP port for the server
  • HTTP_ADDRESS, set default HTTP address for the server
  • NATS_SERVER_URL, set the URL for the NATS server (if enabled), or plugin default
  • WEBHOOK_SECRET_KEY, set the secret key to require by exposed webhook
  • FEATURE_PLATFORM_INFO_DISABLE, to disable the logging of some info related to the current runtime platform like: Node.js version, OS name, Fastify version, Webapp version, etc ...
  • FEATURE_CHECK_RUNTIME_ENV_DISABLE, to disable (not load) related plugin; if enabled and current Node.js environment is not compatible with the one set in 'package.json' by default it will throw an exception, so the webapp will crash (to avoid running the webapp in a not compliant env)
  • FEATURE_FAVICON_DISABLE, to disable (not load) related plugin
  • FEATURE_WEBHOOK_DISABLE, to disable (not load) related plugin
  • FEATURE_HEALTHCHECK_DISABLE, to disable (not load) related plugin
  • FEATURE_CLOUDEVENTS_DISABLE, to disable (not load) related plugin; note that this by default uses a public NATS server so disable it if not needed or if that server is not reachable for corporate firewall policies
  • FEATURE_CLOUDEVENTS_STRICT_DISABLE, to disable strict mode in generated CloudEvents (if/when related plugin is enabled)
  • FEATURE_CLOUDEVENTS_LOG_CONSOLE_DISABLE, to disable CloudEvent serialization to console
  • FEATURE_CLOUDEVENTS_LOG_FILE_DISABLE, to disable CloudEvent serialization to console, by default true (so disabled); note that when enabled a new log file will be created at any run of the server, but previous (if present) will be overwritten, so any new run is fresh and old logs will be discarded
  • FEATURE_NATS_DISABLE, to disable (not load) related plugin if not specified default behavior will be applied.

As a sample, by default (unless disabled) some messages will be sent to a NATS queue, when the web application has started and when a client ask for a page. NATS server by default (in related plugin) is a public one, demo.nats.io.

License

Licensed under Apache-2.0.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].