npm install
npm run server
You can use
<script type="module" src="main.mjs"></script>
in your browser html code to import main module
And then from main module you can import
import { add, subtract} from './modules/calculator.mjs';
Modern browser support this feature