Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

배포 설정 코드 #39

Open
lebmouse opened this issue Aug 31, 2019 · 0 comments
Open

배포 설정 코드 #39

lebmouse opened this issue Aug 31, 2019 · 0 comments

Comments

@lebmouse
Copy link
Collaborator

dist/.ebextensions/node-settings.config

option_settings:
  aws:elasticbeanstalk:container:nodejs: 
    NodeCommand: "npm start"
    ProxyServer: nginx
  aws:elasticbeanstalk:container:nodejs:staticfiles:
    /index.html: index.html

dist/server.js

var express = require('express');
var path = require('path');
var serveStatic = require('serve-static');
app = express();
app.use(serveStatic(__dirname));
var port = process.         env.PORT || 5000;
app.listen(port);
console.log('server started ' + port);

dist/package.json

{
  "name": {name},
  "version": {versiosn},
  "private": true,
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "express": "latest"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant