New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uclabruins-preview

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uclabruins-preview - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

14

app.js

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

console.log('serving preview of ' + pageFile + ' at http://localhost:' + port);
server = http.createServer(function(req, res){
server = http.createServer((req, res) => {
const uri = url.parse(req.url).pathname;

@@ -103,3 +103,3 @@ const filename = path.join(process.cwd(), uri);

else {
fs.exists(filename, function(exists) {
fs.exists(filename, exists => {
if (!exists) {

@@ -111,3 +111,3 @@ res.writeHead(404, {"Content-Type": "text/plain"});

else {
fs.readFile(filename, "binary", function(err, file) {
fs.readFile(filename, "binary", (err, file) => {
if (err) {

@@ -128,3 +128,3 @@ res.writeHead(500, {"Content-Type": "text/plain"});

// from restarting
req.connection.destroy();
setTimeout(() => { req.connection.destroy() }, 10*1000);
}).listen(port, 'localhost');

@@ -135,8 +135,8 @@ }

chokidar.watch(pageFile).on('change', function(){
chokidar.watch(pageFile).on('change', () => {
// listen for changes to the page file. if it changes, stop and restart the server.
var date = new Date();
var formattedTime = [date.getHours(), date.getMinutes(), date.getSeconds()].join(':');
const date = new Date();
const formattedTime = [date.getHours(), date.getMinutes(), date.getSeconds()].join(':');
console.log('[' + formattedTime + '] ' + 'detected change, reloading...');
server.close(readPage); // invoke readPage as a callback once server is closed
});
{
"name": "uclabruins-preview",
"version": "1.2.0",
"version": "1.2.1",
"description": "Preview pages on uclabruins.com.",

@@ -5,0 +5,0 @@ "main": "app.js",

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