Skip to content

A full-stack sample application build using feathers.js and MongoDB (using mongoose) and react app for the client.

Notifications You must be signed in to change notification settings

sujeetkrjaiswal/feathers-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feathers Sample Application

Setting up sample Data

data/input folder has two json file one for customers and one for orders. These files are generated using online sample data generators.

Run npm start in order to pre-process the generated files in order to map the customer._id to orders randomly and set the createdAt and updatedAt to same value

Execute the below commands to import the data to your db.

mongoimport --db feather-sample --collection customers --file ./data/output/customers.txt
mongoimport --db feather-sample --collection orders --file ./data/output/orders.txt

Running the server

npm start
# for dev mode
npm run dev

Running the client

# for local development
npm start
# for build
npm run build

For production deployment

Steps to be setup in jenkins or any other CICD tool

# step 1: build the client
cd client
npm install
npm run build
# step 2: move the build files to server/public (replace)
mv -r build/* ../server/public
# step 3: Build the server
npm install
npm run compile

Folders for interest/to be deployed to server

server/lib/*
server/public/*
server/package.json
server/package-lock.json

Screenshots of final output

Analytics Page Screen

Analytics

Order's List

Orders List

Customer's List

Customers List

Customer details page

Customer Details

Payload screenshot of /customer

Payload

How was the setup done

Server

We are using feathers server. The project setup is done via below commands

npm i -g @feathersjs/cli
# name: server (REST), authentication: true (local), mongoose data model for users
# with typescript
feathers generate app 
# customers: Mongoose
feathers generate service
# orders: Mongoose
feathers generate service
# analytics: Custom service
feathers generate service

Client

Using standard create-react-app

About

A full-stack sample application build using feathers.js and MongoDB (using mongoose) and react app for the client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published