/fixmylife-node-api

boilerplate for node express backend to make my life simpler

Primary LanguageJavaScriptMIT LicenseMIT

Fixmylife-Node-Api

boilerplate for node express backend to make my life simpler
This is a set up I personally use when building a backend.

Using the Api

When you login a user, in return you get a Token. You'll want to return that token in your headers when making a axios call for post, put or delete.

  • Api Doc - Documentation on all the endpoints this api comes with.

Getting Started

First lets fork and clone this project so its yours.
After you have it downloaded, you can run these commands to get it started.

yarn install
yarn server

yarn server

Then open http://localhost:4000/ to see that your api is running.
When you know your app is running you are ready to make axios calls!

Dependencies Included

Change the api info

If you are planning on using this Api for a project we should start by giving it a name. Go to your package.json file and you'll want up update name, description, repository and author.

Users Seeded data

You can change the users seeded data to fit your projects needs you can get creative and add as many users as you need to get your project started. Where to find 001-users.js

database
└── seeds
    └──**001-users.js**

Posts Seeded data

You can change the posts seeded data to fit your projects needs you can get creative and add as posts just remember to add a user id to user_id. Where to find 002-posts.js

database
└── seeds
    └──**002-posts.js**

Important! If you do change the seeds

You will need to run these command to make the changes.

npx knex migrate:rollback   
npx knex migrate:latest  
npx knex seed:run 

Acknowledgements

Photos used for this api for the seeded data were provided by unsplash.com.

License

Fixmylife Node Api is free to anyone who would like to use it licensed as MIT.

Say Thanks

If you use this Api feel free to let me know or if you have any feed back on things I can change or do better thats always appreciated thank you. You can email me contact@duranirving.com or drop a message in my website duranirving.com.