Skip to content

Geocld/vue-jwt-vueRouter-vueResource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-jwt-vueRouter-vueResource

使用vue component的方式实现的单页需登录认证app,认证方式直接使用了auth0提供的nodejs jwt认证模块nodejs-jwt-authentication-sample,页面切换采用了vue-router,和服务器端的通信认证使用了vue-resource。

##使用方法

1、安装认证模块(server文件夹)需要使用的依赖:

cd ./server
npm install

2、认证模块依赖安装成功后,回到主目录安装项目依赖:

cd ..
npm install

3、启动node服务器:

node ./server/server.js

成功启动后服务器会监听在http://localhost:3001

4、打开另一个终端,运行项目开发配置:

npm run dev

运行成功后,打开浏览器,进入http://localhost:8080即可查看项目文件(因为第一次需要加载热加载模块,第一次打开速度会比较慢)。

##预览

About

一个使用vue组件的认证登陆app,配合vue-router和vue-resource实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published