CatsMiaow / Tested
Programming Languages
Projects that are alternatives of or similar to Tested
Tested
ECMAScript 6(as ES6/ES2015)์ผ๋ก ์์ฑํ MEAN Stack ๊ธฐ๋ฐ์ Angular Material UI๋ฅผ ์ ์ฉํ ๊ฒ์ํ ์์ค์ ๋๋ค.
DEMO http://dist.tested.co.kr
apiDoc http://discord.tested.kr/apidoc
Node.js
Node.js 6.x ๋ฏธ๋ง์ ๋ฒ์ ์ .babelrc ์ค์ ๊ฐ์ ์๋์ ๊ฐ์ด ์์ ํฉ๋๋ค.
{
"presets": "es2015"
}
์ค์น
// 1. back-end์์ ์ฌ์ฉ๋๋ node_modules ์ค์น
$ npm install // --production
// 2. front-end์์ ์ฌ์ฉ๋๋ node_modules ์ค์น
$ cd src/client
$ npm install
// 3. front-end ๋ชจ๋์ ์ฌ๋ณผ๋ฆญ ๋งํฌ ์์ฑ
// 3-1. ๋ฆฌ๋
์ค
$ cd resource/public
$ ln -s ../../src/client/node_modules/ vendor
// 3-2. ์๋์ฐ, cmd ํ๋ก๊ทธ๋จ์ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํ
$ mklink /d "C:\Tested\resource\public\vendor" "C:\Tested\src\client\node_modules"
์ด๊ธฐ ์ธํ
http://domain.com:PORT/init
๊ด๋ฆฌ์ ์์ด๋, ๊ณต์ง์ฌํญ / ์ผ๋ฐ๊ฒ์ํ ์ถ๊ฐ
init function ์ค์ ๊ฐ ์์ ํ ์คํ
๊ด๋ฆฌ์ ํ์ด์ง
http://domain.com:PORT/admin
๊ด๋ฆฌ์ ๋ก๊ทธ์ธ ํ ์ ์ ๊ฐ๋ฅ, ๊ฒ์ํ ๋ฐ ์ฌ์ฉ์ ๊ด๋ฆฌ
Custom Style
//- resource/public/css/*.css, views/index.jade - 11 line
link(rel="stylesheet" type="text/css" href="/https/gitplanet.com/css/style.css")
ํด๋ ๊ตฌ์กฐ
+-- dist // ์๋ฒ ๋น๋ ํ์ผ
+-- logs // ๋ก๊ทธ
+-- resource // ์ธ๋ถ์์ ์ ๊ทผํ ์ ์๋ ์์
| +-- private // ๋น๊ณต๊ฐ ๋ฆฌ์์ค
| | +-- admin // ๊ด๋ฆฌ์ ์ ์ฉ
| +-- public // ๊ณต๊ฐ ๋ฆฌ์์ค
| | +-- css // style.css
| | +-- data // ํ์ผ ํด๋
| | | +-- file // ๊ฒ์ํ๋ณ ํ์ผ
| | | +-- temp // ์์ ํ์ผ
| | +-- langs // ์ธ์ด ํ์ผ, TinyMCE
| | +-- vendor // src\client\node_modules ์ฌ๋ณผ๋ฆญ ๋งํฌ
+-- src // ํ๋ก๊ทธ๋จ ์์ค
| +-- client // AngularJS ํด๋ผ์ด์ธํธ ์์ค
| | +-- admin // ๊ด๋ฆฌ์
| | +-- service // ์ฌ์ฉ์
| +-- server // Node.js ์๋ฒ ์์ค
+-- test // Mocha API test
+-- views // Jade template
๋น๋
$ NODE_ENV=production npm run build
//> dist/server/**
//> manifest.json
//> resource/public/bundle-*.js
//> resource/private/admin/bundle-*.js
Front-End ์ฌ๋ฐฐํฌ
http://domain.com:PORT/deploy
๊ด๋ฆฌ์ ๋ก๊ทธ์ธ ํ ์คํ ๊ฐ๋ฅ
์๋ฒ๊ฐ ๊ตฌ๋๋์ด ์๋ ์ํ์์ Front-End ์์ค๊ฐ ๋ณ๊ฒฝ๋์์ ๋ ์ฌ์ฉ
๋น๋ ์ ์์ฑ๋ manifest.json ์ค์ ๊ธฐ์ค์ผ๋ก bundle ํ์ผ ๊ต์ฒด ์ํ
์๋ฒ ๊ตฌ๋
$ npm start // PORT=1234 NODE_ENV=localhost
API Tests
$ NODE_ENV=test npm start
$ npm test
API ๋ฌธ์
$ npm install -g apidoc
$ apidoc -i ./src/server/ -o ../apidoc/
//> ../apidoc/index.html ์คํ
Required Database
MEAN Stack Components, https://en.wikipedia.org/wiki/MEAN_(software_bundle)
- MongoDB with Mongoose
- Express
- AngularJS with Angular Material
- NodeJS
