altair-express-middleware
Advanced tools
Comparing version 1.0.1 to 1.0.4
declare const path: any; | ||
declare const express: any; | ||
declare const altairStatic: any; |
'use strict'; | ||
var path = require('path'); | ||
var express = require('express'); | ||
var altairStatic = require('altair-static'); | ||
module.exports = { | ||
altairExpress: function (opts) { | ||
var app = express(); | ||
app.use(express.static(path.join(__dirname, '../dist'))); | ||
app.get('*', function (req, res) { | ||
return res.sendFile(path.join(__dirname, '../dist/index.html')); | ||
return res.send(altairStatic.renderAltair()); | ||
}); | ||
@@ -11,0 +11,0 @@ return app; |
@@ -5,2 +5,3 @@ 'use strict'; | ||
const express = require('express'); | ||
const altairStatic = require('altair-static'); | ||
@@ -11,6 +12,4 @@ module.exports = { | ||
app.use(express.static(path.join(__dirname, '../dist'))); | ||
app.get('*', (req, res) => { | ||
return res.sendFile(path.join(__dirname, '../dist/index.html')); | ||
return res.send(altairStatic.renderAltair()); | ||
}); | ||
@@ -17,0 +16,0 @@ |
{ | ||
"name": "altair-express-middleware", | ||
"version": "1.0.1", | ||
"version": "1.0.4", | ||
"description": "Express middleware for altair graphql client", | ||
@@ -11,3 +11,3 @@ "main": "./build/index.js", | ||
"declarations": "tsc --declaration", | ||
"prepare": "npm run prepare-dist; npm run declarations" | ||
"prepare": "npm run declarations" | ||
}, | ||
@@ -34,2 +34,3 @@ "engines": { | ||
"dependencies": { | ||
"altair-static": "^1.0.3", | ||
"express": "^4.16.2" | ||
@@ -40,3 +41,4 @@ }, | ||
"typescript": "^2.8.1" | ||
} | ||
}, | ||
"gitHead": "bd01c0ae41e87e0b17106561762cb2b8a4e4ea1a" | ||
} |
{ | ||
"compilerOptions": { | ||
"outDir": "build/", | ||
"declaration": true, | ||
"types": [ | ||
@@ -5,0 +6,0 @@ "node", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
3965
2
7
46
1
+ Addedaltair-static@^1.0.3
+ Addedaltair-static@1.0.5(transitive)