Phoenix Framework 中文入门教程
前端开发一直都是我的主业。是的,我是在暗示你:Phoenix Framework 非常容易上手。不过也因为我一直在从事前端开发,后端的一些概念我可能理解得不够到位,如有错误,欢迎指正。
目录
捐款
如果教程对你有很大帮助,并且你对捐款没有心理阴影的话,欢迎扫描下方的支付宝二维码:
License & Copyright
© 2017 陈三
本作品采用知识共享署名-禁止演绎 4.0 国际许可协议进行许可。
Phoenix Framework 中文入门教程 - 我的 Phoenix 项目开发历险记
License: Other
前端开发一直都是我的主业。是的,我是在暗示你:Phoenix Framework 非常容易上手。不过也因为我一直在从事前端开发,后端的一些概念我可能理解得不够到位,如有错误,欢迎指正。
如果教程对你有很大帮助,并且你对捐款没有心理阴影的话,欢迎扫描下方的支付宝二维码:
© 2017 陈三
本作品采用知识共享署名-禁止演绎 4.0 国际许可协议进行许可。
目前教程中涉及的代码片段都是 git log -p
的结果,示例如下:
diff --git a/web/controllers/recipe_controller.ex b/web/controllers/recipe_controller.ex
index 96a0276..832ca52 100644
--- a/web/controllers/recipe_controller.ex
+++ b/web/controllers/recipe_controller.ex
@@ -1,5 +1,6 @@
defmodule TvRecipe.RecipeController do
use TvRecipe.Web, :controller
+ plug :login_require when action in [:new, :create, :edit, :update, :delete]
alias TvRecipe.Recipe
不知道这样的形式有没有问题。
如果觉得能接受,请点击 +1,无法接受,请点击 -1。
或者有其它建议,可以附在评论中。
根据你的教程已经完成注册登录,也在看其他教程添加了Guardian库,正在改进注册登录部分。本人之前根据这个文档实现了pjax,但是表单提交部分遇到了点问题,表单提交时pjax生效无刷新返回首页但是地址栏的地址并没有改变。在此以后有更新的打算希望加上Guardian库的使用和pjax的完美实现。非常感谢你的分享,有了这个教程,phoenix的注册登录部分理解透了。再次感谢!
前面创建的项目名为menu,请问下这里cd tv_recipe是哪个目录?
您好,我跟着教程走 貌似在mix phoenix.server 之前还应该要安装node的依赖(教程上没有),否则node watcher不能工作,静态资源也无法访问。但是我npm install 出现错误如下:
npm ERR! path ../deps/phoenix
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../deps/phoenix' -> '/vagrant/tv_recipe/node_modules/phoenix'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-10-13T05_01_48_293Z-debug.log
刚学Phoenix,遇到的问题也可能有点那个啥,forgive me!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.