React-starter-kit: Serverless (Remove: sqlite, passport, etc.)

Created on 9 Oct 2017  路  5Comments  路  Source: kriasoft/react-starter-kit

Based on branch feature/apollo

Firstly, I want to say that this project is really good and nice to work with. Thank you so much for creating it and keeping it updated.

I have been thinking that I want to have a separate project for my API endpoints. I've been looking at nodejs starter kit and would like to find out if I can use these projects together and create a 'microservices' like architecture.

_I hope this suggested way of using RSK is viable and usable in production._

What I want to do is:

  • [ ] Use RSK as the front-end server(no db, auth, validation etc.)
  • [ ] Query data from a local network/IP-address
  • [ ] Use nodejs starter kit as the API.
  • [x] Run both projects together in a Docker-compose environment

So far I've been able to run both projects in a Docker env and the containers can ping each other. I'm using a docker-compose file with custom defined networks, just to clarify how I'm doing that.

I have also:

  • [x] Disabled Sequelize from loading on app.listen in server.js
  • [x] Removed Login routes in server.js
  • [x] Removed Passport in server.js and the file itself.
  • [x] The user models in /data/models

I think it would be a great help to have an updated branch for people who want to use RSK but already have databases and endpoints they'd want to integrate.

An effort has already been made(#1057), I'll reference this even though I'm not sure how much they overlap.

Most helpful comment

After creating a new project with react-starter-kit as a front-end and nodejs-api-starter as a backend and configured basic stuff (start/build/deploy/test) we will remove data layer from this boilerplate. Coming soon...

All 5 comments

After creating a new project with react-starter-kit as a front-end and nodejs-api-starter as a backend and configured basic stuff (start/build/deploy/test) we will remove data layer from this boilerplate. Coming soon...

If I can do anything to speed things up, let me know. I'm very eager to try this! :)

Do you have a more specific timeframe? I know it's hard to say exactly when, but it would be nice to know whether it's days, weeks or months.

We added a new app-starter-kit (ASK) repo with react-starter-kit (RSK) as a frontend and nodejs-api-starter (NSK) as a backend. Remaining to add a basic configuration (start/build/deploy/test) and tips to readme (requirements/getting starter/deployment). After that we will be able to remove data layer from RSK. Feel free to send PRs :)

Would you suggest I use react-static-boilerplate for a serverless app? Or would it be better to take out the backend dependencies of react-starter-kit?

I'm planning to use Relay Modern or Apollo and a graphql-go on the backend.

@patrick-samy it is easier to develop serverless apps but SSR has its advantages. I think ASK will stick with RSK, you can swap frontend to RSB if you want. Backend part (data layer) will be removed from RSK in favor of GraphQL cloud api by default (the transition to Rest API should be simple). Also probably we will start using Relay Modern in master branch. ASK will contain basic configuration of RSK and NSK working together.

Was this page helpful?
0 / 5 - 0 ratings