Skip to content

Commit

Permalink
Remove use of pify from the static-server script (#18239)
Browse files Browse the repository at this point in the history
The static server script no longer uses `pify`. `pify` was being used
to promisify the `fs.stat` function, but that function has a built-in
Promise-supporting API that is now used instead.
  • Loading branch information
Gudahtt authored Mar 21, 2023
1 parent 5e3770e commit be63190
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions development/static-server.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env node
const fs = require('fs');
const fs = require('fs').promises;
const path = require('path');

const chalk = require('chalk');
const pify = require('pify');

const createStaticServer = require('./create-static-server');
const { parsePort } = require('./lib/parse-port');

const fsStat = pify(fs.stat);
const fsStat = fs.stat;
const DEFAULT_PORT = 9080;

const onResponse = (request, response) => {
Expand Down

0 comments on commit be63190

Please sign in to comment.