码迷,mamicode.com
首页 > Web开发 > 详细

node.js开发博客系统前端项目搭建(一)

时间:2017-08-11 21:07:33      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:mac   jquery   query   log   mongod   开启   content   技术   博客   

Express: https://github.com/petecoop/generator-express

安装node.js和npm

执行:

npm install -g yo
npm install -g generator-express

  执行:yo

技术分享

创建项目成功。

项目的目录:

技术分享

brew安装:MongoDb

http://blog.csdn.net/moumaobuchiyu/article/details/54885306

http://www.cnblogs.com/junqilian/p/4109580.html

出现这个错误:(没有安装mongodb)

技术分享

用brew安装mongodb:

brew install mongodb

mac新建文件夹的命令:

sudo mkdir -p /data/db

  添加可读可写的权限:

chown `id -u` /data/db

  执行命令:

mongod

 在开启一个终端:

mongo

  指定目录执行:

gulp

  安装bootstrap:

bower install bootstrap --save 
引入bootstrap:
doctype html
html(lang=‘en‘)
head
meta(charset=‘UTF-8‘)
meta(name=‘viewport‘, content=‘width=device-width‘)
title= title
block css
link(rel=‘stylesheet‘, href=‘components/bootstrap/dist/css/bootstrap.css‘)
link(rel=‘stylesheet‘, href=‘/css/style.css‘)
block js
script(src=‘/components/jquery/dist/jquery.js‘)
script(src=‘/components/bootstrap/dist/js/bootstrap.js‘)
if ENV_DEVELOPMENT
script(src=‘http://localhost:35729/livereload.js‘)
body
block content

node.js开发博客系统前端项目搭建(一)

标签:mac   jquery   query   log   mongod   开启   content   技术   博客   

原文地址:http://www.cnblogs.com/sunliyuan/p/7347900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!