a simple web app server that already setup work path for you!
just open terminal and use the following commands:
$git clone https://github.com/AimeTPGM/AngularAppStarter.git
$cd ~/path/to/directory/AngularAppStarter
$npm start
Then the live-reloadable app will be running on localhost:3001
That's it! Enjoy!
This project is using AngularJS, JADE and SASS
Project Structure
|- app.js
|- bin
|-- build-css
|-- watch-css
|-- start
|- gulpfile.js
|- node_modules
|- package-lock.json
|- package.json
|- src
|-- index.jade
|-- assets
|--- fonts
|--- js
|--- sass
|- public
|-- index.html
|-- assets
|--- fonts
|--- js
|--- css
src/index.jade
is for adding css and js located insrc/assets/
foldersrc/views/
contains view files in .jade type.src/assets
folder contains css, js, and fonts for using in the web.src/assets/js/
contains js filessrc/assets/sass/
contains sass files.src/assets/fonts/
contains fonts
- open terminal and run the commands above
- live reload app will be running on
localhost:3001
- use
src
folder to modify your website - all changes in
src
will be automatically compiled and copied topublic
folder
Please Download and Install Docker in your machine First
you can use
docker run -p 3001:3001 -d aimetpgm/angular-app-starter:latest --name angular-app-starter
to see the docker example running at yourDockerIP:3001
- build your docker image by
docker build -t <your docker username>/angular-app-starter .
or use Docker Cloud linked with your angular app starter repository in your GitHub
- after finish building docker image, run the image by
docker run -p 3001:3001 -d <your docker username>/angular-app-starter:latest --name angular-app-starter
- go to
yourDockerIP:3001
that's it!
if you face the following error
Error: listen EADDRINUSE :::3000
it means that your node server is still running on port 3000, you could stop the server by running
killall -9 node
But this will kill all node process. If you would like to stop a single process, you can use
lsof -i tcp:3000
it will display something like this
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 18734 AimeTPGM 13u IPv6 0x3027a33fa553d9ed 0t0 TCP *:hbci (LISTEN)
find the command name node then kill the process by PID, for example:
kill -9 18734
the node process will be completedly killed