Skip to content

Commit

Permalink
feat: add fedx-scripts serve (#404)
Browse files Browse the repository at this point in the history
* feat: add serve command to fedx-scripts to run production bundle
* docs: add ADR about serve command
* feat: support .env.development and .env.private
* docs: update ADR to include .env* support
* chore: update package-lock.json take 3
* chore: pin express devDep
  • Loading branch information
adamstankiewicz authored and muselesscreator committed Aug 31, 2023
1 parent 3926fa2 commit 5a61aa6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ Local module configuration for TypeScript
}
```

Serving a production Webpack build locally
------------------------------------------

In some scenarios, you may want to run a production Webpack build locally. To serve a production build locally:

#. Create an ``env.config.js`` file containing the configuration for local development, with the exception of ``NODE_ENV='production'``.
#. Run ``npm run build`` to build the production assets. The output assets will rely on the local development configuration specified in the prior step.
#. Add an NPM script ``serve`` to your application's ``package.json`` (i.e., ``"serve": "fedx-scripts serve"``).
#. Run ``npm run serve`` to serve your production build assets. It will attempt to run the build on the same port specified in the ``env.config.js`` file.

Development
-----------

Expand Down
19 changes: 0 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a61aa6

Please sign in to comment.