Giter Club home page Giter Club logo

essay's Introduction

database Version License

演示网站

Essay - 个性化博客系统

安装

安装前请确保本地的Node版本大于16,本机已安装sqlite

# 下载项目
git clone https://github.com/wmui/essay.git
# 安装依赖
yarn install # or npm install
# 启动项目
npm run start

项目启动后,访问 http://127.0.0.1:7001/install,进入安装界面:

点击下一步,设置管理员密码:

点击完成设置,安装就完成了,超简单

开始写作

点击新随笔,开始愉快的创作吧

essay's People

Contributors

sinchang avatar wmui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

essay's Issues

proxy如何解决跨域请求呢?

你好,我想在本地进行开发,但是后台不想设置请求头,我如果要在前端设置代理,要怎么设置nuxt.config.js呢 ?

能不能告知项目搭建的步骤

我非常喜欢这个项目,但是我不太理解怎么搭建起来的;我查看过nuxt.js的搭建过程;也查看过express的搭建过程,但是我不知道你是怎么合并前后端到同一个工程里面,谢谢了

nuxt+express 和 不使用express有什么区别

想问一下 nuxt使用express 和 不使用express有什么区别
使用express项目中多了server文件夹 是要自己写后端的接口吗(做全栈?) 还是只是转发一下 只是转发的话 目的是为了什么

建议使用yarn安装

操作系统:win10
Node版本:8.12.0

npm install后执行npm run dev报错
qq 20181007181330

怀疑是使用npm安装使得eslint相关包和webpack和原项目不一样

使用yarn安装能正常运行

本地运行错误

npm run dev之后报错
Error Nuxt error
TypeError: Cannot read property 'icon' of undefined

挺棒的啊

线上怎么部署

我想用你的这个整体结构写一个线上的项目,我之前看到底部有一个线上部署的教程,可以给我发一个吗,参考一下,

几个问题

我很抱歉
我是日本人。 我读不懂中文。
这是用Google翻译书写的。

这个项目非常好。
我想开发这个。

所以我有一些问题。

  • v1.x.x的开发结束了吗? (我正在开发v1.x.x)

本项目基于vue-hackernews-2.0开发,长期更新,由于是个人项目,不建议直接用于线上,欢迎issue,欢迎PR,该项目不会添加过多复杂功能,追求轻量,以原生APP的体验作为目标。

  • 我写,但如果我想发展,我可以给你一个公关?
  • 如果这不好,我可以做另一个仓库而不是叉子吗?
    (注意:我将在README.md中写成“fork wmui / vueblog”)

点击登陆后不会转入后台,但是提示登陆成功

export default{ layout:'login', name: 'Login', data () { return { username: '', password: '', loginTip: '' } }, methods: { async login () { if (this.username === '' || this.password === '') { this.loginTip = '请正确填写用户名和密码' return } await this.$store.dispatch('LOGIN', { username: this.username, password: this.password }) if (this.$store.state.status.code === 200) { // 登录成功, 存储token this.$store.commit('SET_USER', this.$store.state.status.token) this.$router.push('/publish') this.username = '' this.password = '' } this.loginTip = this.$store.state.status.message } } }

如何获取/缓存 nuxt.render的渲染结果

Hello.请问:
使用 lru-cache 缓存页面与组件,
如何拿到类似 renderToString 的 html 缓存起来?
在koa中:

app.use(async (ctx, next) => {
  ...
  nuxt.render(ctx.req, ctx.res, promise => {
    // 测试结果:回调始终不执行
  })
})

2.3.0 局域网 访问失败

您好,使用2.3.0版本本地电脑部署成功,可是为什么在手机访问电脑ip+port确实不通?手机和电脑明明是在一个局域网中的

添加server/index.js文件后请求会有问题

const { Nuxt, Builder } = require('nuxt')
const consola = require('consola')
const bodyParser = require('body-parser')
const cookieParser = require('cookie-parser')
const app = require('express')()
const axios = require('axios')

// Body parser,用来封装 req.body
app.use(bodyParser.json())
app.use(cookieParser())

// 发起 POST /api/login 请求完成用户登录,并添加该用户到 req.session.authUser
app.post('/api/login', function (req, res) {

  axios.post(`${ process.env.BASE_URL }/api/passwordLogin`, req.body).then(data => {
    const token = data.data.data;
    if (token) {
      res.cookie('adminToken', token, {
        maxAge: 60000 * 15
      })
    }
    return res.json(data.data)
  }, err => {
    console.log(err, 'err');
    res.status(500).send(err.message);
  })
})

app.post('/api/logout', function (req, res) {
  delete req.session.authUser
  res.json({ ok: true })
})

let config = require('../nuxt.config.js')
config.dev = !(process.env.NODE_ENV === 'production')

async function start() {
  const nuxt = new Nuxt(config);
  if (config.dev) {
    const builder = new Builder(nuxt)
    await builder.build()
  }

  app.use(nuxt.render)
  app.listen(3000)
  consola.ready({
    message: `Server listening on http://127.0.0.1:3000`,
    badge: true
  })
}

start();

你好这是我新建文件的内容,是根据你的代码写的(我只通过express转发登录、登出请求并保存token) 如果通过这个启动nuxt发现有的请求会失败,通过nuxt命令启动就不会有,请问我这样写哪里有问题吗?

latex

Thanks for you created this application,Its very great that i think!I has a problem when using it, I need latex syntax support,Can you add that with next version?

IE11如何适配

在IE11上报错,提示“对象不支持forEach属性或方法”。

bug:前端ajax请求头里面既没有带cookie也没有带token

浏览器:360浏览器
版本: v9.5
内核版本:Chrome 63.0

我启动项目登录后,前端所有的ajax请求包括打标签、创建文章等需要token的请求头里面既没有带上cookie也没有带上token,导致后端checkToken处理时全部返回的“Please login”。

后台登录失败

第一次进入后台后,再打开浏览器进去后台还有验证登录, 点击登录没有跳转到管理后台

编译通过,访问出错

database connect successed
(node:796) UnhandledPromiseRejectionWarning: MongoError: command find requires authentication
at queryCallback (E:\nodejs_Study\essay\node_modules\mongodb-core\lib\cursor.js:248:25)
at E:\nodejs_Study\essay\node_modules\mongodb-core\lib\connection\pool.js:532:18
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:796) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:796) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

访问
http://127.0.0.1:3000/
错误
TypeError
Cannot read property 'nickname' of undefined

本地运行错误,不知什么原因

按照您的说明,node的版本是8.4.0,但是运行后出现如下错误,求指教
webpack built 4bf6e1050eae9eecd060 in 10597ms error during render : / undefined
然后打开localhost:8080是
500|Interval Server Error

nmp run build 没有index

npm run build 生成的dist文件夹里面没有index.html
image
配置文件没有修改,只是把关于数据库的东西给删掉了,因为我只负责前端的部分

修改service.js和app.js到正式域名后,执行pm2 start ecosystem.json --env production报错

执行pm2 logs vueblog后报以下错误
0|vueblog | Error: Cannot find module './dist/vue-ssr-server-bundle.json'
0|vueblog | at Function.Module._resolveFilename (module.js:469:15)
0|vueblog | at Function.Module._load (module.js:417:25)
0|vueblog | at Module.require (module.js:497:17)
0|vueblog | at require (internal/module.js:20:19)
0|vueblog | at Object. (/vueblog/server.js:53:18)
0|vueblog | at Module._compile (module.js:570:32)
0|vueblog | at Object.Module._extensions..js (module.js:579:10)
0|vueblog | at Module.load (module.js:487:32)
0|vueblog | at tryModuleLoad (module.js:446:12)
0|vueblog | at Function.Module._load (module.js:438:3)

挺棒的啊

挺棒的啊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.