Skip to content

Using Nuxt to decouple the view and controller in a PHP application.

Notifications You must be signed in to change notification settings

widoyo/nuxt-slim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nuxt + Slim

A basic concept using Nuxt and Slim to decouple controllers and views in a PHP application.

Read the post here about this repository.

Nuxt Setup

# Dependencies
$ npm install

# Production
$ npm start

Then, access it at http://localhost:3000/

Slim Setup

# Dependencies
$ composer update

# Production
$ cd [my-app-name]
$ php -S 0.0.0.0:8181 -t public

Then, access it at http://localhost:8181/

Dependencies

  1. Node
  1. PHP

Notes

  1. Using this approach, you must run two apps concurrently on different ports.

  2. Operation timed out (IPv6 issues). On linux, it seems that running this command helps to make ipv4 traffic have a higher prio than ipv6, which is a better alternative than disabling ipv6 entirely:

$ sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"

About

Using Nuxt to decouple the view and controller in a PHP application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 52.4%
  • Vue 36.3%
  • JavaScript 7.6%
  • CSS 3.7%