반응형
반응형

Node.js 웹서버로 만들기   http://localhost:3000

 

var http = require('http');
var fs = require('fs');
var app = http.createServer(function(request,response){
    var url = request.url;
    if(request.url == '/'){
      url = '/index.html';
    }
    if(request.url == '/favicon.ico'){
      //return response.writeHead(404);
      response.writeHead(404);
      response.end();
      return;
    }
    response.writeHead(200);
    console.log(__dirname + url);
    response.end(fs.readFileSync(__dirname + url));

});
app.listen(3000);

 

https://youtu.be/VGZTn1diz_I

 

opentutorials.org/course/3332/21032

 

Node.js - 웹서버 만들기 - 생활코딩

수업소개 Node.js는 웹서버 기능을 가지고 있습니다. 이런 특성을 이용해서 컨텐츠를 프로그래밍적으로 생산할 수 있게 됩니다. 여기서는 Node.js를 웹서버로 구동하는 방법을 살펴보겠습니다.  강

opentutorials.org

소스 : github.com/web-n/web1_html_internet

 

web-n/web1_html_internet

Contribute to web-n/web1_html_internet development by creating an account on GitHub.

github.com

 

반응형
반응형

nodejs.org/ko/들어가서 다운로드 후 설치.

 

설치 후 CMD 뛰워서 아래와 같이 버전 및 실행 테스트. 

 

C:\Users\HWKim>node -v
v14.15.1

C:\Users\HWKim>node
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> console.log(1+1)
2
undefined
> console.log(1+1);
2
undefined
>
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
>

C:\Users\HWKim>

강의 리스트 : opentutorials.org/course/3332

 

WEB2 - Node.js - 생활코딩

수업소개 이 수업은 JavaScript를 이용해서 Node.js를 제어해 동적으로 HTML 코드를 생성하는 웹애플리케이션을 만드는 방법에 대한 수업입니다.  수업대상 예를들어 1억개의 페이지로 이루어진 웹사

opentutorials.org

유튜브 재생목록 : www.youtube.com/playlist?list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm

 

WEB2 - Node.js

 

www.youtube.com

 

반응형
반응형

TCP SCHOOL 소개

www.tcpschool.com/

 

코딩교육 티씨피스쿨

4차산업혁명, 코딩교육, 소프트웨어교육, 코딩기초, SW코딩, 기초코딩부터 자바 파이썬 등

tcpschool.com

 

반응형
반응형

CSS 이미지 스프라이트(Image Sprite)

 

이미지 스프라이트(image sprite)란 여러 개의 이미지를 하나의 이미지로 합쳐서 관리하는 이미지를 의미합니다.

 

웹 페이지에 이미지가 사용될 경우 해당 이미지를 다운받기 위해 웹 브라우저는 서버에 이미지를 요청하게 됩니다.

하지만 사용된 이미지가 많을 경우 웹 브라우저는 서버에 해당 이미지의 수만큼 요청해야만 하므로 웹 페이지의 로딩 시간이 오래 걸리게 됩니다.

 

이미지 스프라이트(image sprite)를 사용하면 이미지를 다운받기 위한 서버 요청을 단 몇 번으로 줄일 수 있습니다.

모바일 환경과 같이 한정된 자원을 사용하는 플랫폼(platform)에서는 웹 페이지의 로딩 시간을 단축해주는 효과가 있습니다.

또한, 많은 이미지 파일을 관리하는 대신 몇 개의 스프라이트 이미지(sprite image) 파일만을 관리하면 되므로 매우 간편합니다.

 

다음 예제는 하나의 이미지를 가지고 네 개의 아이콘을 만드는 예제입니다.

네 개의 아이콘을 만들기 위해 네 개의 이미지를 사용하는 것이 아닌 다음 이미지 하나만을 가지고 작업하게 됩니다.

<style>
    .up, .down, .right, .left { background: url("/examples/images/img_image_sprites.png") no-repeat; }
    .up { width: 21px; height: 20px; background-position: 0 0; }
    .down { width: 21px; height: 20px; background-position: -21px 0; }
    .right { width: 22px; height: 20px; background-position: -42px 0; }
    .left { width: 22px; height: 20px; background-position: -65px 0; }
</style>

 

코딩 연습 : www.tcpschool.com/examples/tryit/tryhtml.php?filename=css_basic_imageSprites_01

 

©TCP-tryWWW

CSS Image Sprites .up, .down, .right, .left { background: url("/examples/images/img_image_sprites.png") no-repeat; } .up { width: 21px; height: 20px; background-position: 0 0; } .down { width: 21px; height: 20px; background-position: -21px 0; } .right { wi

www.tcpschool.com

<!DOCTYPE html>
<html lang="ko">

<head>
	<meta charset="UTF-8">
	<title>CSS Image Sprites</title>
	<style>
		.up, .down, .right, .left {
			background: url("/examples/images/img_image_sprites.png") no-repeat;
		}
		.up {
			width: 21px;
			height: 20px;
			background-position: 0 0;
		}
		.down {
			width: 21px;
			height: 20px;
			background-position: -21px 0;
		}
		.right {
			width: 22px;
			height: 20px;
			background-position: -42px 0;
		}
		.left {
			width: 22px;
			height: 20px;
			background-position: -65px 0;
		}
	</style>
</head>

<body>

	<h2>이미지 스프라이트를 이용한 이미지 로딩</h2>
	<p>- 원본 이미지 -</p>
	<img src="/examples/images/img_image_sprites.png"><br><br>
	<p>- 추출한 이미지 -</p>
	<div class="up"></div><br>
	<div class="down"></div><br>
	<div class="right"></div><br>
	<div class="left"></div><br>

</body>

</html>
반응형

'프로그래밍 > Style & Design' 카테고리의 다른 글

A guide of UI design trends for 2021  (0) 2020.12.09
[Style] Bootstrap - admin LTE  (0) 2020.11.24
[iCon] iCon download  (0) 2020.10.19
Free themes for Bootstrap  (0) 2020.10.14
[FONT] 웹 한글 폰트 - 눈누 https://noonnu.cc/  (0) 2020.09.17
반응형

2020년 기업의 디지털트랜스포메이션 전략은 어떻게 변화되고 있는가?

 

보스턴 컨설팅 그룹은 코로나-19 영향으로 기업의 디지털트랜스포메이션 전략이 어떻게 변화 되었는지를 분석하기 위하여 2020년 3개월간(3월~6월) 825명의 글로벌 리더들을 대상으로 설문조사를 진행하였다. 

 

www.bcg.com/publications/2020/the-evolving-state-of-digital-transformation

 

The Evolving State of Digital Transformation

A recent survey reveals that businesses are accelerating their investment in digital technologies, despite the economic downturn, targeting digitally enabled goals to support their recovery.

www.bcg.com

digitaltransformation.co.kr/%ea%b8%b0%ec%97%85%ec%9d%98-%eb%94%94%ec%a7%80%ed%84%b8%ed%8a%b8%eb%9e%9c%ec%8a%a4%ed%8f%ac%eb%a9%94%ec%9d%b4%ec%85%98-%ec%a0%84%eb%9e%b5%ec%9d%80-%ec%96%b4%eb%96%bb%ea%b2%8c-%eb%b3%80%ed%99%94/

 

2020년 기업의 디지털트랜스포메이션 전략은 어떻게 변화되고 있는가?

보스턴 컨설팅 그룹은 코로나-19 영향으로 기업의 디지털트랜스포메이션 전략이 어떻게 변화 되었는지를 분석하기 위하여 2020년 3개월간(3월~6월) 825명의 글로벌 리더들을 대상으로 설문조사를

digitaltransformation.co.kr

 

반응형
반응형

Active Server Pages (ASP)

안정화버전 배포가 2000년. 이제 안녕이라고 해야 할때가 온것인가.

 

en.m.wikipedia.org/wiki/Active_Server_Pages

 

Active Server Pages - Wikipedia

ASP uses scripting on the server to generate content that is sent to the client's web browser via HTTP response. The ASP interpreter reads and executes all script code between <% and %> tags, the result of which is content generation. These scripts were w

en.m.wikipedia.org

반응형

'프로그래밍 > Web' 카테고리의 다른 글

[ASP] random 적용 난수 발생  (0) 2020.11.24
AWSOME DAY 온라인 컨퍼런스  (0) 2020.11.24
javascript Chart circular gauge color-bar  (0) 2020.11.16
Windows의 ASP (Active Server Pages) 지원  (0) 2020.11.16
Ajaxload gif  (0) 2020.11.09

+ Recent posts