this document is a weak memorandum for my cheap working job
connect AWS EC2 instnce
connect by SSH to Linux instance from ec2-user
- push [Connect] buttom below
use EC2 Instance Connect (browser base SSH conection)
- select
EC2 Instance Connect
and push [Connect] buttom below
install Node.js
install nvm (node version manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
activate nvm
. ~/.nvm/nvm.sh
install recent version of Node.js
nvm install node
test for correct Node.js install and execute
node -e"console.log('Running Node.js ' + process.version)"
then display below on terminal
Running Node.js VERSION
install Express web framework for Node.js
make service directory and change this directory
mkdir dev/nodejs/express/app
cd dev/nodejs/express/app
initialise Node.js project
npm init -y
install Node.js web framework Express
npm install--save express
then create node_modules
folder and setting lock file package-lock.json
install express that create web application template library for express framework
install Express-Generator and create a template
npm install-g express-generator
create web application template what name is members
express --view=ejs members
move directory for web application template and install
cd members
npm install
test running express web application
npm start
then display terminal blow
> members@0.0.0 start /home/ec2-user/dev/nodejs/express/app/members
> node ./bin/www
access web browser to URL
http://localhost:3000
orhttp://0.0.0.0:3000
orhttp://computer-name:3000