Meteor Recipes

두번째 이야기

Kick-start

빨리

코딩을 하고 싶어!

시작해볼까요?

다시 프로젝트를 만들어요

meteor create --bare app

좀 길다구요?

자세히 살펴보죠

meteor create --bare app

미티어로

meteor create --bare app

만든다

meteor create --bare app

벌거벗은(응?)

meteor create --bare app

앱을

이 이름은 자유롭게 해요
(단, 특수문자 안됨. 영문 소문자만!)

meteor

그리고 실행

$ meteor
[[[[[ ~/Documents/js/_app/test/app ]]]]]      

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

브라우저에서

http://localhost:3000

열면...?

아무것도 안나온다?

괜찮습니다

맨땅에서

시작합니다

위대한 첫 HTML

mkdir client

cd client

<head>
  <title>Hello</title>
</head>
<body>
  {{> main}}
</body>

<template name="main">
  <h1>Hello, world!</h1>
</template>

Hello, World!

./client/main.html

위대한 첫 JS

코드를 코드답게

Meteor.startup(function() {
  console.log("Hi, everyone");
});

javascript도 만들어요

./client/main.js

그럼 다음에 또

제발~

Meteor Recipes - 2nd episode

By Lee Jaeho

Meteor Recipes - 2nd episode

  • 915