Angular2 SuperAdmin with Webpack
- Webpack;
- Oauth2 authentication flow;
Install the dependencies with npm install
or sudo npm install
.
The auth configurations are located in the src/app/common/config-example.ts file. Since configurations may vary from local setup to production setup, to enable these you must do a cp src/app/common/config_example.ts config.ts first. The generated file will be your configuration file, and should never be commited back to the repo.
The package is setup so you can easily add external packages to your project, while making it easier to manage dependencies. Doing
npm install <package-name>
will add the package to the node_modules folder. You can browse for available packages through npm search page, and general documentation on bower in npmjs.com.
- npm run start will run webpack-dev-server and serve your contents
from memory only
onhttp://127.0.0.1:3000
. You are ready to start developing - npm run clean will clean the dist folder
- npm run build
If you are having errors try deleting the node_modules folder and run npm install
again.
-
Production / Staging
- npm run build to bundle all your files to the /dist folder.
-
Development
- Run
npm install -g http-server
or add it to your dependencies if you want it local. - npm run static and open your browser at
http://127.0.0.1:8090/
.
- Run