You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					18 lines
				
				361 B
			
		
		
			
		
	
	
					18 lines
				
				361 B
			| 
								 
											3 years ago
										 
									 | 
							
								'use strict'
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								const fastify = require('fastify')({ logger: true })
							 | 
						||
| 
								 | 
							
								// const swagger = require('fastify-swagger')
							 | 
						||
| 
								 | 
							
								const swagger = require('..')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								fastify.register(swagger, {
							 | 
						||
| 
								 | 
							
								  mode: 'static',
							 | 
						||
| 
								 | 
							
								  specification: {
							 | 
						||
| 
								 | 
							
								    path: './examples/example-static-specification.yaml'
							 | 
						||
| 
								 | 
							
								  },
							 | 
						||
| 
								 | 
							
								  exposeRoute: true
							 | 
						||
| 
								 | 
							
								})
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								fastify.listen({ port: 3000 }, (err) => {
							 | 
						||
| 
								 | 
							
								  if (err) throw err
							 | 
						||
| 
								 | 
							
								})
							 |