Last active
November 3, 2016 04:14
-
-
Save ooade/dd100749e4a004b041d6fe0d2ec1c6a3 to your computer and use it in GitHub Desktop.
Initialize express without webpack
This file contains hidden or 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
const express = require('express'); | |
// Chalk was added by create-react-app, use only on the dev side | |
const chalk = require('chalk'); | |
// Initialize express | |
const app = express(); | |
const PORT = process.env.PORT || 3000; | |
// Start up our express server | |
app.listen(PORT, (error) => { | |
if (error) throw error; | |
console.log(chalk.green('Express app listening on port'), PORT); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment