Skip to content

gongmingqm10/greedy-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greedy Express

Express project build with yo

We use mongodb for the database. And less for css, coffee for js. Make sure you have already started the mongod server.

In my Mac, I start the mongodb server via mongod.

Run the website

This project is a nodejs server and build with gulp. You can start it:

npm install

It'll install the necessary packages declared in package.json. After you installed all the packages.

gulp

Visit the localhost:3000, when the page loads Generator-Express MVC. You indeed succeed.

Deploy

We'll use the PM2 to start the nodejs application, and will use Nginx proxy to forward it to port 80.

Given you have already logged in the AWS machine.

## 1. Update the repo
git pull

## 2. package the application
gulp package

## 3. Restart PM2
NODE_ENV=production pm2 restart appName,  cd dist && NODE_ENV=production pm2 start app.js (for the first time)

4. Visit the host 'http://54.238.131.129', and believe you can reach it

Congratulations!

About

Express project build with yo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published