coryhouse / pluralsight-redux-starter

Completed Dev Environment for "Building Applications with React and Redux" on Pluralsight
https://app.pluralsight.com/library/courses/react-redux-react-router-es6/
1.27k stars 912 forks source link

how to use mock api on server for demo purpose ??? #100

Closed a-m-dev closed 6 years ago

a-m-dev commented 6 years ago

hi there, first of all , i can say that this course is the best one out there... (thank you cory for that)

my main question is how can i implement mock api as it is in src folder in build folder and use it for demo purpose , my website has no back end and i'm a frontend developer i have no api endpoints to fetch data from it , it there a way to have a mock api ( as you just implemented in course for development ) for production to implement on server?????

i mean that can i make webpack to copy the api folder ( with file loader ) to the dist folder and i use fetch to get data from those api files and everything works as it should BUT on server and it works online ????????

i use react 16.4.1 webpack 4.16.0 redux 4.0.0

please help me ....

coryhouse commented 6 years ago

Thanks for the kind feedback! Here's a blog post where I explore mock APIs. You can also check out my Building a JS Dev Environment course on Pluralsight where I do something similar.