Skip to content

Instantly share code, notes, and snippets.

@ooade
Last active November 3, 2016 04:14
Show Gist options
  • Save ooade/dd100749e4a004b041d6fe0d2ec1c6a3 to your computer and use it in GitHub Desktop.
Save ooade/dd100749e4a004b041d6fe0d2ec1c6a3 to your computer and use it in GitHub Desktop.
Initialize express without webpack
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