All Projects → Albert-Gao → feathers-next-example

Albert-Gao / feathers-next-example

Licence: MIT license
Use feathers with next.js

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to feathers-next-example

feathers-example-fileupload
A feathers file upload example, using feathers-blob.
Stars: ✭ 58 (+41.46%)
Mutual labels:  feathers
mostly-node
Mostly simple way to microservices in Node.js
Stars: ✭ 18 (-56.1%)
Mutual labels:  feathers
feathers-versionate
Create and work with nested services.
Stars: ✭ 29 (-29.27%)
Mutual labels:  feathers
moleculer-adapter-feathers
Moleculer service mixin wrapping Feathers.js services
Stars: ✭ 17 (-58.54%)
Mutual labels:  feathers
feathers-vuex-todomvc
Feathers-vuex TodoMVC demo
Stars: ✭ 29 (-29.27%)
Mutual labels:  feathers
feathers-solr
Feathersjs Solr Client
Stars: ✭ 29 (-29.27%)
Mutual labels:  feathers
flutter feathersjs.dart
Communicate with your feathers js server from flutter app with unbelieved ease and make happy your customers.
Stars: ✭ 19 (-53.66%)
Mutual labels:  feathers
Feathers
A framework for real-time applications and REST APIs with JavaScript and TypeScript
Stars: ✭ 13,761 (+33463.41%)
Mutual labels:  feathers
Moonshine-IDE
Moonshine is a free and open source middleweight IDE built with ActionScript 3 for ActionScript 3, Apache Flex®, Apache Royale™, and Feathers development, with Cloud and Desktop support.
Stars: ✭ 86 (+109.76%)
Mutual labels:  feathers
FlipED
A LMS built specifically for Thailand's Education 4.0 system.
Stars: ✭ 24 (-41.46%)
Mutual labels:  feathers
feathers-swift
FeathersJS Swift SDK, written with love.
Stars: ✭ 51 (+24.39%)
Mutual labels:  feathers
mostly-feathers
Convert your Feathers APIs into microservices
Stars: ✭ 26 (-36.59%)
Mutual labels:  feathers

feathers-next-example

This is a setup about how to use feathers along with next.js.

What about the code

The feathers part are based on the code generated from the feathers-cli. Which I think should make people understand more easily(because I consider this as the official way).

Folder Structure

  • client: next.js part;
  • server: feathers part;

Including some optimizing and request handling tips.

How to dev

Normally, you just use npm run server:dev, then you can work on the server and client at the same time. It will run feathers.js. But any changes you made in the ./client/ part will be hot reloaded and reflect to the actual page.

If you only want to work on the client side, just call npm run client:dev

How to deploy

  1. npm run client:build: To bundle the production ready code.
  2. npm run server:start:prod: To start the server. (You might want to use PM2 or nodemon here.)

How to check it works

  • Run the feathers server: npm run server:dev
  • Open http://localhost:3030, see next page
  • Open http://localhost:3030/users, see feathers.js error page
  • Update ./client/pages/index.js, see the hot module reloading

Important

Every time you add a feathers service, make sure to add it to feathersServices in ./server/middleware/next.js like this:

const feathersServices = {
  '/users': true,
};

More details

See detail step by step in my blog

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].