You can use this page where you write the code and check the result immediately:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
Tuesday, March 10, 2020
Monday, March 9, 2020
Build Rest API with NodeJS
Ain't this article cute? (with all the pictures, icons, emojis):
https://dev.to/lenmorld/quick-rest-api-with-node-and-express-in-5-minutes-336j (my 5 stars to this author)
Golden statement from the author: Rest API means providing an API to clients via HTTP Methods
https://www.positronx.io/build-secure-node-js-mongodb-express-restful-api-from-scratch/
Also, other useful links while practicing these exercises:
https://medium.com/@alexishevia/using-cors-in-express-cac7e29b005b
All in all, to overcome the CORS issue while playing around with express & rest api:
npm install cors
In server.js...
let cors = require('cors')
server.use(cors())
This would set the Access-Control-Allow-Origin: *
https://alligator.io/react/axios-react/
https://dev.to/lenmorld/quick-rest-api-with-node-and-express-in-5-minutes-336j (my 5 stars to this author)
Golden statement from the author: Rest API means providing an API to clients via HTTP Methods
https://www.positronx.io/build-secure-node-js-mongodb-express-restful-api-from-scratch/
Also, other useful links while practicing these exercises:
https://medium.com/@alexishevia/using-cors-in-express-cac7e29b005b
All in all, to overcome the CORS issue while playing around with express & rest api:
npm install cors
In server.js...
let cors = require('cors')
server.use(cors())
This would set the Access-Control-Allow-Origin: *
https://alligator.io/react/axios-react/
Thursday, March 5, 2020
ReactJS - Hey, don't forget to read the documentation
Good documentation helps to understand the concepts faster. If you are new to ReactJS, this is one of the best pages to begin learning: https://reactjs.org/docs/getting-started.html
Sunday, February 16, 2020
It's all about Spring Boot
Building a Spring Boot application with Rest API
- This link has the simplest Rest API building example: https://spring.io/guides/gs/rest-service/
- Also check out the links at the end of the page of https://spring.io/guides/gs/rest-service/ and you will learn almost everything using Spring Boot.
- Also check this page too: https://spring.io/guides#getting-started-guides
Building a Spring Boot and ReactJS mono-repo application
- Look no further! This link has all listed out all the details: https://github.com/kantega/react-and-spring
Spring Boot application with Postgresql on Heroku
- On Mac, brew install Postgresql
- Some useful commands to work with Postgresql on local:
- By default, Postgresql is already started. If not, use this command to manually start the Postgresqlpg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
- To turn-off Postgresql manually, use this command pg_ctl -D /usr/local/var/postgres stop -s -m fast
- To access Postgres from command prompt: psql postgres -U kad221
- To stop the access to Postgres from command prompt: quit psql CMD+D
- Follow the instructions to set up and push the spring boot application to Heroku: https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku
- In Heroku dashboard, select the spring boot application that is deployed.
- Go to Resources, click on the Heroku Postgres, click on settings > View Credentials > Copy URI.
- From command prompt: psql <paste the URI here> and hit enter.
- In application.properties, add spring.datasource.url: <paste URI here>
- From command prompt, run ./mvnw spring-boot:run, and you are good to go with the development.
Monday, February 10, 2020
Search is over to find spring-and-react application build guidelines
It took some time to find this, but found it eventually :)
Building a spring boot application with ReactJS front end: https://github.com/kantega/react-and-spring
Building a spring boot application with ReactJS front end: https://github.com/kantega/react-and-spring
Subscribe to:
Posts (Atom)