An integrated application hosting platform which allows you to host your SPAs. It also provides common services like
- Authentication and Authorization
- Notifications Framework
- Feedback Framework
- Docker Download
npm install
Copy all the .env.example
to .env
and add the following fields
-
For SPAs (packages ending with *-spa)
- Add API_URL and set the url to .env
-
For services (packages ending with *-service)
- Add database path in DB_PATH
- Add database name in DB_NAME
- Add database username in DB_USER
- Add database password in DB_PASSWORD
## Database
DB_PATH=localhost
DB_NAME=platform
DB_USER=admin
DB_PASSWORD=admin
To start the local environment setup using docker-compose, use the following cli command from the root of this project:
docker-compose up $service_name
This will start the service along with any dependent services/databases required for the service (for eg. mongo).
Note: The service name should match the service labels given the docker-compose.yml in the root directory.
You can also use docker-compose as a personal MongoDB instance. Just uncomment the ports in the docker-compose.yml file.
services:
...
mongo:
...
ports:
- <local_port>:27017
You can replace the local port with any available port on your machine. I would recommend to not use the same 27017
port for your local, as that might cause conflicts with your local installation of MongoDB.
After that, just start the service:
docker-compose up mongo
This will start a MongoDB container instance, which can be accessed using localhost via the port mentioned in the docker-compose.
npm run test
Note: spashiprc
needs to be pre-configured on your system prior to using this script. Please check SPAship documentation to learn how to set this up correctly.
You can use the deployment script for deploying any SPA to One Platform:
npm run deploy <PackageType> <PackageName> <PackagePath> <DeploymentEnv> <RefValue>
Deployment parameters:
-
PackageType
: Based on the type of package, the value can either bespa
orservice
. -
PackageName
: Name of the package directory. The expected directory naming convention ispackage name
-spa/service
. Examples:foo-spa
,bar-spa
. -
PackagePath
: Route to which the package needs to be deployed. Examples:/
,/foo
,/bar
,/foo/bar
. -
DeploymentEnv
: The environment to which the package needs to be deployed. The value of this parameter needs to correspond with the name of an environment entry in your.spashiprc
file. Examples:qa
,stage
,opqa
,opstage
. -
RefValue
: The reference version for this package. Usually this corresponds to a version number, however, it can also correspond to a string value for a valid ref. Example:0.1.0
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
This project is MIT licensed.