In this blog post we are going to get back our index page that says "My Bank Application"
Here are the steps to serve up static files in Express:
1. Open up the express app.js file with an IDE or text editor
2. You will see the line app.use(express.static(path.join(__dirname, 'public'))); , change it to app.use(express.static(path.join(__dirname, 'app'))); what we did was telling express to use the folder app for static files instead of the public folder. With this setup you can always go back and use the Jade view engine if you choose to. We haven't taken take option off the table.
3. Now open the command prompt and type nodemon into to command prompt, open the browser and type into the address bar http://localhost:3000 you should see "My Bank Application" now we are back in business
Posts In The AngularJS SPA Application Series:
- Setting Up Angular-Seed
- Preparing Angular-Seed For The Shopping List Application
- Refactor Code to Not Use Global Variables (Shopping List App)
- Installing MongoDB
- Create a MongoDB Configuration FIle
- Install mongoDB as a Windows Service
- Installing Express generator
- Installing ExpressJS Application Server
- Creating The SPA Project Folder Structure
- Setup Express To Serve Static Files
- Setup The Shopping Application For Heroku And Testing It Locally
- Deploy Shopping List Application To Heroku
- Install RoboMongo GUI for MongoDB
Mua vé tại đại lý vé máy bay Aivivu, tham khảo
ReplyDeleteve may bay di my gia re
có chuyến bay từ mỹ về việt nam chưa
mua vé máy bay từ đức về việt nam
giá vé máy bay nga về việt nam
ve may bay tu anh ve viet nam
lịch bay từ pháp về việt nam
chi phí vé máy bay cho chuyên gia nước ngoài