Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ampify/dev-server

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampify/dev-server - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

index.js

@@ -6,3 +6,3 @@ #!/usr/bin/env node

const { text } = require('body-parser');
const { join } = require('path');
const path = require('path');
const fs = require('fs').promises;

@@ -13,6 +13,8 @@

const publicPath = path.resolve(process.argv[2] || './dist');
app.use(morgan('short'));
app.use(text({ limit: '50mb' }));
app.use(
express.static(join(__dirname, 'public'), {
express.static(publicPath, {
etag: false,

@@ -25,4 +27,9 @@ maxAge: 0,

try {
await fs.writeFile('./public/latest.html', req.body, 'utf-8');
res.json({ url: `http://localhost:${port}/latest.html` });
await fs.writeFile(
path.resolve(publicPath, 'index.html'),
req.body,
'utf-8',
);
await res.json({ url: `http://localhost:${port}/index.html` });
} catch (e) {

@@ -29,0 +36,0 @@ next(e);

{
"name": "@ampify/dev-server",
"version": "1.0.2",
"version": "1.0.3",
"main": "index.js",

@@ -18,3 +18,3 @@ "bin": "index.js",

},
"gitHead": "d56c40da463b5969ff8847888fd250eb5f8f2252"
"gitHead": "ef90abff29eabeff22f7b9e84458efd11c03222e"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc