-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c5c5b3
commit ee9b465
Showing
7 changed files
with
115 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Manapaho (https://github.com/manapaho/) | ||
* | ||
* Copyright © 2015 Manapaho. All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE.txt file in the root directory of this source tree. | ||
*/ | ||
|
||
import path from 'path'; | ||
import express from'express'; | ||
import task from './lib/task'; | ||
|
||
/** | ||
* Serves the production build. | ||
*/ | ||
export default task('serve build', async () => { | ||
// Development data port. | ||
const PORT = 8080; | ||
// Create an endpoint. | ||
var server = express(); | ||
// Serve the static build files. | ||
server.use(express.static(path.resolve(__dirname, '../dist'))); | ||
// Log every incoming query. | ||
server.use((req, res, next) => { | ||
console.log('Time:', Date.now()); | ||
next(); | ||
}); | ||
// Run the server. | ||
server.listen(PORT, () => console.log( | ||
`Server is now running on http://localhost:${PORT}` | ||
)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters