Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application:
Make sure you have installed all of the following prerequisites on your development machine:
$ npm install -g bower
$ npm install -g grunt-cli
Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your MEAN application.
The first thing you should do is install the Node.js dependencies. The boilerplate comes pre-bundled with a package.json file that contains the list of modules you need to start your application. To learn more about the modules installed visit the NPM & Package.json section.
To install Node.js dependencies you're going to use npm again. In the application folder run this in the command-line:
$ npm install
This command does a few things:
You could change some enviroment variables like port, your site's name and site's API Key related to Chargebee.
You could find the following codes in gruntfile.js easily.
159 default: {
160 PORT: 8080,
161 chargebeeSite: 'tenant-test',
162 chargebeeAPIKey: 'test_Htlw6DLaXvBDjwSsGFm706mX2awaV63cd'
163 },
Use the chargebee.configure to configure your site and your API key. It is a global configuration and can be setup as part of your server initialization
Of course before that, you must have an account and Test site(Live site) on Chargebee.
If you are new on Charegebee, you could visit Chargebee Official Website, create an account and get Test/Live site.
During SignUp process, You should choose a domain for your business(chargebeeSite).
After SignUp/SignIn, go to Setting/API & WEBHOOKS/API Keys. You could find the API Key named full_access_key_v1.
And then, you must add Redirect URL and Cancel URL for Payment Method Page on Chargebee.
Go to Setting/HOSTED PAGES SETTINGS/Payment Method Page.
You could set Redirect URL and Cancel URL there. For instance, http://localhost:8080/#/account/subscription.
Change http://localhost:8080/ to your site's domain there.
As Chargebee allows only 443, 80, 8443, 8080 ports, you must set port value with one of these values. Intially, MEAN.JS application provide us port 3000, but we cann't use this value as of that reason.
After the install process is over, you'll be able to run your application using Grunt, just run grunt default task:
$ grunt
Your application should run on port 8080 with the development environment configuration, so in your browser just go to http://localhost:8080
That's it! Your application should be running. To proceed with your development, check the other sections in this documentation. If you encounter any problems, try the Troubleshooting section.
config/env/development.js for development environment configuration optionsTo run your application with production environment configuration, execute grunt as follows:
$ grunt prod
config/env/production.js for production environment configuration optionsApplication will start by default with secure configuration (SSL mode) turned on and listen on port 8443. To run your application in a secure manner you'll need to use OpenSSL and generate a set of self-signed certificates. Unix-based users can use the following command:
$ sh ./scripts/generate-ssl-certs.sh
Windows users can follow instructions found here. After you've generated the key and certificate, place them in the config/sslcerts folder.
Finally, execute grunt's prod task grunt prod
secure option in config/env/production.jsYou can run the full test suite included with MEAN.JS with the test task:
$ grunt test
This will run both the server-side tests (located in the app/tests/ directory) and the client-side tests (located in the public/modules/*/tests/).
To execute only the server tests, run the test:server task:
$ grunt test:server
And to run only the client tests, run the test:client task:
$ grunt test:client
$ docker-compose up
$ docker build -t mean .
$ docker run -p 27017:27017 -d --name db mongo
$ docker run -p 8080:8080 --link db:db_1 mean
$
$ docker run -p 8080:8080 -p 35729:35729 -v /Users/mdl/workspace/mean-stack/mean/public:/home/mean/public -v /Users/mdl/workspace/mean-stack/mean/app:/home/mean/app --link db:db_1 mean
The Digital Garage
Content type
Image
Digest
Size
394.6 MB
Last updated
over 10 years ago
docker pull leokraken/cochera