Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ES module option. #316

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions templates/mjs/app.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import createError from 'http-errors';
<% } -%>
import express from 'express';
drjeffjackson marked this conversation as resolved.
Show resolved Hide resolved
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import path from 'path';
import { fileURLToPath } from 'url';
<% Object.keys(modules).sort().forEach(function (variable) { -%>
import <%- variable %> from '<%- modules[variable] %>';
<% }); -%>
Expand Down
2 changes: 1 addition & 1 deletion templates/mjs/www.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import app from '../app.mjs';
import http from 'node:http';
import http from 'http';
drjeffjackson marked this conversation as resolved.
Show resolved Hide resolved
import debugFunction from 'debug';
const debug = debugFunction('<%- name %>:server');

Expand Down