Wednesday, July 2, 2014

How to create angular app and host on heroku using cosmos frameowk in 5 simple steps

Angular seed project is configured to use npm to do basic tasks like download required packages. You should have node installed on your machine. You won't need it after you download the required package. Cosmos will host the application using tornado in both development and production environment. In production use a reverse proxy like nginx to serve the static files. Now follow the steps to create and run the angular-seed application.

Create angular project using cosmosadmin

If you do not have mongodb or virtualenv installed install those first. For ubuntu its like:

sudo apt-get install mongodb
sudo apt-get install python-virtualenv

First create a virtualenv and activate it:

virtualenv --no-site-packages testenv
source testenv/bin/activate
Now install cosmos inside it:
pip install cosmos

Run new-project command with angular from console from any directory to create new project:

cosmosadmin new-project angular

This will create basic cosmos application and download angular-seed project from github. Here is sample output.

new-project
-----------Cloning angular seed project--------------

Cloning into 'angular-seed'...
remote: Counting objects: 2475, done.
remote: Compressing objects: 100% (1237/1237), done.
remote: Total 2475 (delta 1071), reused 2475 (delta 1071)
Receiving objects: 100% (2475/2475), 13.80 MiB | 2.19 MiB/s, done.
Resolving deltas: 100% (1071/1071), done.
Checking connectivity... done.
----------- You should run "npm install" from angular-seed directory now -------------

You should now open settings.py and local_settings.py files to adjust database and other settings.

Now change directory to angular-seed and run npm install:

cd angular-seed
npm install

This will download all required packages for angular-seed application.

Now go back to project directory and run:

cd ..
python cosmosmain.py

You may now browse to http://localhost:8080/ to view your newly created application.

Host the app on heroku

If you want to host your application on heroku you need Procfile and requirements.txt files. You may create these files using following command:

python cosmosmain.py add-herokusettings

Now run the application using foreman (you should have heroku toolbelt installed on the machine):

foreman start

You may now browse to http://localhost:5000/ to view your application. Now commit and push the application to heroku for deployment.

54 comments:

  1. Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject. ACMarket

    ReplyDelete
  2. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Action Link Wireless

    ReplyDelete
  3. I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. Snapchat++

    ReplyDelete
  4. This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. emus4u

    ReplyDelete
  5. I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day! AirShou iOS 10

    ReplyDelete
  6. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!! AntiRevoke iOS 11

    ReplyDelete
  7. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists. Cydia iOS 11.3

    ReplyDelete
  8. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists. download 9apps

    ReplyDelete
  9. It is truly a great and helpful piece of info,Excellent blog,Thanks for sharing. Vegas Crime Simulator Apk

    ReplyDelete
  10. This is the type of information I’ve long been trying to find. Thank you for writing this information. vidmate download

    ReplyDelete
  11. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. best iphone launcher

    ReplyDelete
  12. Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work. Click here to read more!

    ReplyDelete
  13. With the chances of accomplishment being high, https://iphoneappdevelopmentcompany.com/ endeavors must find a way to manufacture portable apps for business the correct way.

    ReplyDelete
  14. You look fantastic thanks for sharing blog. If you are looking for the estoque lamborghini price

    ReplyDelete
  15. very good post thanks for nice sharing,we found very interesting
    Website know moreTips news by this post

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. To make Android advertise progressively mainstream Android Application are free for everybody, he/she can download from various site. A large number of free apps been downloaded day by day by Android client.
    https://appcloner.app
    https://appcloner.net

    ReplyDelete
  18. I waterfrontt any phrase to realize this call.....truely i'm impressed from this make recognized....the individual that make this screen it changed into a very good human..thanks for shared this long past us. appcloner

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. Alle Spyware-Programme erfordern, dass Sie physisch Zugriff auf das Zielgerät haben, um solche Programme zu installieren. iphoneorten.de/ist-es-moeglich-das-whatsapp-anderer-nutzer-aus-der-ferne-zu-hacken/ Telefonüberwachungsanwendungen sind entstanden, um Ihnen zu helfen, die Kontrolle über diejenigen zu übernehmen, die Sie lieben und um die Sie sich kümmern.

    ReplyDelete
  21. If the users keep pressing the multitasking button or the home button of an Android gadget, a task manager will come up which features a list of the apps which have been opened lately.Cheat Engine No Root APK

    ReplyDelete
  22. For getting a quality mobile app development, you will have to hire an expert mobile application development company that can develop a mobile application as per your business requirement.Top 10 Mobile app development Companies in India

    ReplyDelete
  23. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. app developer

    ReplyDelete
  24. At the point when we talk about telephone then in a split second Android come in our psyche, and we realize that Android stage is developing at a hurried rate around the world. Bulk SMS Service Provider in Sharjah UAE

    ReplyDelete
  25. This is why some enterprises lock their apps with mobile device management solutions, which when wrongly used, lead to poor client experience. On the other hand, employees dislike too much control on company networks and over their own devices.Top 10 Mobile App development Companies in UK

    ReplyDelete
  26. To be honest, a mobile application is an icing on the cake for the user experience, while calls and text messages are the foremost functions of a mobile device.Smart AudioBook Player

    ReplyDelete
  27. Everybody nowadays claims a PDA, which either has windows, Mac or Android OS. Android is generally mainstream among all.itools crack

    ReplyDelete
  28. If you are a job seeker, Career Circular is the best website for you. We collect many BD job circular and posting here. You can easily find your dream job.

    BD Job Circular
    Prothom Alo Jobs
    Latest Job Circular
    BD Jobs
    BD Gov Jobs News

    ReplyDelete
  29. Hey! Finally we are launch 150+ High DA Dofollow White Hat Manual SEO Backlinks here! Order Now and Boost your website ranking.

    100% Google Indexing White Hat Manual SEO Backlinks

    Thank you!
    DigiPeek

    ReplyDelete
  30. Living room furniture does not allows need to face the television. A conversation area off to the side is a great idea for breaking up the space. This area can be used for conversation. To decor your house with gypsum at first you should know about gypsum design cost.

    ReplyDelete
  31. Het was geweldig. Bedankt voor het delen van dit bericht.

    Als u SEO-diensten nodig heeft, kunt u contact opnemen met Nexoz Company.

    SEO is het bereiken van hoge posities in zoekmachines.

    SEO-site met als doel het aantal bezoekers te vergroten door ervaren experts

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. Are you currently using a wood-burning fireplace to decrease your dependence upon fossil fuels? If so, remember to shut the flue damper very tightly when your fireplace is not being used. If you forget to do this, both warmed or cooled air will easily escape from your house through the chimney.
    For your environmental testing support hire an environmental organizations and they will suggest your for all kind of this.

    ReplyDelete
  34. مهمترین هدف مجموعه ریوال ایجسنی تامین نیازهای قسمت های مختلف گرافیکی و تبلیغاتی در سطح بین الملل در داخل کشور می باشد.

    ریوال ایجنسی با سابقه ای درخشان و با در اختیار داشتن کادری مجرب و حرفه ای در عرصه گرافیک و تبلیغات آماده همکاری با شرکت های داخلی و خارجی می باشد.

    برخی از خدمات ما شامل موارد زیر است:

    گرافیک: طراحی ست اداری، طراحی بروشور، طراحی بسته بندی، طراحی کاتالوگ و ...

    تبلیغات: ساخت فیلم صنعتی، عکاسی، عکاسی تبلیغاتی، عکاسی صنعتی، موشن گرافیک و ...

    طراحی و توسعه: طراحی سایت، طراحی اپلیکیشن، سئو سایت، تولید محتوای اینستاگرام، تولید محتوا و ...

    ReplyDelete
  35. محتواتون عالی بود.

    در صورت نیاز به خدمات سفارش طراحی لوگو مزون در ریوال آنلاین، با ما تماس بگیرید.

    ReplyDelete
  36. Hello.
    I look here actively discussing various topics, I want to join. I recommend the mod store app for android Modyolo

    ReplyDelete
  37. آژانس طراحی جاسینا طیف گسترده‌ای از خدمات طراحی و توسعه وب‌سایت را ارائه می‌دهد، از جمله:

    استخدام ادمین اینستاگرام دورکاری

    طراحی وب‌سایت‌های سفارشی

    طراحی وب‌سایت‌های واکنش‌گرا

    طراحی و توسعه فروشگاه‌های آنلاین

    طراحی و توسعه اپلیکیشن‌های موبایل

    طراحی لوگو و هویت برند

    طراحی گرافیک

    ReplyDelete
  38. Hello.
    I look here actively discussing various topics, I want to join. I recommend the mod store app for android https://tv-box-apk.com/onlytik/

    ReplyDelete
  39. چندین نوع روش میکروبلیدینگ ابرو نگار یعقوبیان وجود دارد، از جمله:

    کلاسیک: این روش رایج ترین روش میکروبلیدینگ ابرو است. در این تکنیک، هنرمند با استفاده از یک ابزار دستی و یک تیغه فولادی نازک، موهای ظریف را مستقیماً روی پوست ابرو می کشد تا ظاهری پهن تر و ضخیم تر ایجاد کند.
    مرور: این روش مشابه روش کلاسیک است، اما در این روش هنرمند با استفاده از ابزار دستی و سوزن های بسیار ظریف رنگدانه سایه را روی پوست ابرو اعمال می کند تا ظاهر طبیعی تری ایجاد کند.
    3D: این پیشرفته ترین روش است. در این تکنیک هنرمند با استفاده از ابزار دستی و سوزن های بسیار ظریف رنگدانه را به صورت لایه لایه به پوست ابرو تزریق می کند تا ظاهری سه بعدی ایجاد کند.

    ReplyDelete
  40. فروشگاه استوت محصولات خود را با قیمت مناسب و با تخفیف های ویژه ارائه می دهد. این فروشگاه همچنین دارای سیستم حمل و نقل سریع و مطمئن است که امکان دریافت محصولات خریداری شده را در کوتاه ترین زمان ممکن فراهم می کند.
    http://stoat.ir/

    ReplyDelete