this is a Sails v1 application setup with client-side rendered react app. For a server side rendered setup using next.js, check this project out
There is a copy of .env.example
file in the frontend folder.
I have gone ahead to make the build folder assets
.
You can specify your own, but first, take a look at sails documentation here before you do.
- to install the react app
- using yarn run
npm run yarn:install:frontend
- using npm run
npm run npm:install:frontend
- using yarn run
-
create a
.env
file insidefrontend
folder and paste the content of.env.example
into it -
to build the react app
- using yarn
npm run yarn:build:frontend
- using npm
npm run npm:build:frontend
- using yarn
-
set the value of
sails.config.sockets.onlyAllowOrigins
inconfig/env/production.js
on line 257 or follow deploy Sails app instruction in sails documentation -
You can start sails in production
npm start
- using yarn ```npm run yarn:start:project```
- using npm ```npm run npm:start:project```
-
go ahead and lift the sails app with
sails lift
for development mode -
then, to start react in dev mode run
- using yarn
npm run yarn:dev:frontend
- using npm
npm run npm:dev:frontend
- using yarn
- using yarn ```npm run yarn:dev:project```
- using npm ```npm run npm:dev:project```
- Sails framework documentation
- Version notes / upgrading
- Deployment tips
- Community support options
- Professional / enterprise options
This app was originally generated on Sun Sep 12 2021 23:27:23 GMT+0100 (West Africa Standard Time) using Sails v1.4.4.