this is my first featherjs app
This project uses Feathers. An open source web framework for building modern real-time applications.
Getting up and running is as easy as 1, 2, 3.
-
Install your dependencies
cd path/to/my-first-featherjs-app; npm install
-
Start your app
npm start
Simply run npm test
and all your tests in the test/
directory will be run.
Feathers has a powerful command line interface. Here are a few things it can do:
$ npm install -g @feathersjs/cli # Install Feathers CLI
$ feathers generate service # Generate a new Service
$ feathers generate hook # Generate a new Hook
$ feathers help # Show all commands
For more information on all the things you can do with Feathers visit docs.feathersjs.com.
0.1.0
- Initial release
- 1.1 Cross-domain issue solution by Marshall Thompson
- 1.2 Cross-domain issue solution by Samson Ssali
- Create New User
curl -X POST 'http://localhost:3000/users' -H 'Content-Type: application/json' --data-binary '{ "email": "[email protected]", "password": "123456789"}'
you will see result somthing like this
{"_id":"5d240d024f43a84c264ec699","email":"[email protected]","createdAt":"2019-07-09T03:41:54.867Z","updatedAt":"2019-07-09T03:41:54.867Z","__v":0}
- Authentication New Created User
curl 'http://localhost:3000/authentication/' -H 'Content-Type: application/json' --data-binary '{ "strategy": "local", "email": "[email protected]", "password": "123456789" }'
you will get a token as below
{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJ1c2VySWQiOiI1ZDI0MGQwMjRmNDNhODRjMjY0ZWM2OTkiLCJpYXQiOjE1NjI2NDM4MDYsImV4cCI6MTU2MjczMDIwNiwiYXVkIjoiaHR0cHM6Ly95b3VyZG9tYWluLmNvbSIsImlzcyI6ImZlYXRoZXJzIiwic3ViIjoiYW5vbnltb3VzIiwianRpIjoiMzU2NjFkNGUtN2IwMS00MWNjLTk3NTktYWI3NmYyNzM1MTRjIn0.fg3rHwiT_xUTtiQsSQvJdIgXv9vdIoMuqg7YEjOhztE"}
- Create new messages by authenticated hook
curl 'http://localhost:3000/messages/' -H 'Content-Type: application/json' -H 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJ1c2VySWQiOiI1ZDI0MGJjZjRmNDNhODRjMjY0ZWM2OTgiLCJpYXQiOjE1NjI2NjQwNDcsImV4cCI6MTU2Mjc1MDQ0NywiYXVkIjoiaHR0cHM6Ly95b3VyZG9tYWluLmNvbSIsImlzcyI6ImZlYXRoZXJzIiwic3ViIjoiYW5vbnltb3VzIiwianRpIjoiMThlYThjNmEtOWFlYS00NTVkLThhYzUtZTM1M2UzY2U0NGEzIn0.7bhlL8WiDZ4FGBcQaL-_EmFbD6SM5_oyQRWJBbYZgno' --data-binary '{ "text": "this is my first messages system"}'
you will get a following result like this if ok
{"_id":"5d245c9b2265fe726ab3ed6b","text":"this is my first messages system","createdAt":"2019-07-09T09:21:31.502Z","updatedAt":"2019-07-09T09:21:31.502Z","__v":0}
Copyright (c) 2018
Licensed under the MIT license.