Skip to content

Commit

Permalink
Fix dev server for es6 module
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Aug 1, 2024
1 parent 454bfe2 commit 000a60c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions serve.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
var http = require('http')
var url = require('url')
var fs = require('fs')
var path = require('path')
var baseDirectory = __dirname // or whatever base directory you want
import http from 'http';
import url from 'url';
import fs from 'fs';
import path from 'path';

var baseDirectory = path.dirname(url.fileURLToPath(import.meta.url));

var port = 4001;

Expand Down

0 comments on commit 000a60c

Please sign in to comment.