Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
314 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | const util = require('util')
|
---|
| 2 | const fs = require('fs')
|
---|
| 3 | const { stat } = fs.promises || { stat: util.promisify(fs.stat) }
|
---|
| 4 | const { resolve } = require('path')
|
---|
| 5 | module.exports = async path => {
|
---|
| 6 | try {
|
---|
| 7 | const st = await stat(resolve(path, 'server.js'))
|
---|
| 8 | return st.isFile()
|
---|
| 9 | } catch (er) {
|
---|
| 10 | return false
|
---|
| 11 | }
|
---|
| 12 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.