Refactoring and Cleaning the Utopian API [Part 2]

in #utopian-io4 years ago



I've been doing a ton of work cleaning up the repository for the Utopian API. Unused routes and dead code have been removed as a result. The repository root is now a lot tidier. All of the scripts used are now located under the src folder.



The Mongoose models are now strictly typed thanks to Typescript. This means refactoring any of the DB functionality will be much easier since you will see a compilation error. The project in its entirety is now ready for strict typing.

MONGO_HOST is no longer hardcoded in the NPM scripts. It must now be specified in the environment variables.

All project dependencies have been updated. Babel has been dropped entirely in favor of Typescript. This means that all the unit tests have been converted to Typescript as well.



Logging has been improved. The output formatting of express logs have been changed. There is no more JSON output. If there's an error in a request it will be logged accordingly and is now easy to get to. No longer is it a monster to go through the logs to see where things can go wrong. The unnecessary Morgan logger has been removed. Winston is the only primary logging system now used.



View all the commits at once: https://github.com/utopian-io/api.utopian.io/commits/master
Commits:



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

I've been doing a ton of work

It's good to receive an update; and, I'm very glad to know work was being done on the platform.

I have been trying, unsuccessfully, to log in for a few days.

A little robot acknowledging down for maintenance would be a welcome 'friend'.

Again, thanks for the update. I will give it a look soon.

Peace.

Hello @spiritualmatter how comes you cannot login?

cannot login

@SteemConnect does a perpetual loop; and doesn't open the utopian.io landing page.

Thanks for your reply.

Peace.

mmmhhh this is very strange. Have you tried to logout from https://v2.steemconnect.com/dashboard ? @spiritualmatters

Yes, for several days now @elear.

I have just tried it again with the same perpetual looping.

It would be great to receive feedback from fellow Steemians experiencing this glitch; but, I'm pretty sure it isn't widespread; as more people would be acknowledging concerns.

I'm glad to know you are aware, in the event it is something that needs to be worked out on a larger scale.

Many thanks.

Peace.

@fabien what do u think?

@fabien what do u think?

@elear I think you accidentally sent this to @spiritualmatters instead of @fabien.

Peace.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

I hope this improves greatly now

wwwwwwwwwwwwwwwwwwwoooooooooooooooooooooooooooowwwwwwwwwwwww

I have no idea about all this jazz...

01001110 01100101 01100001 01110100 00100001

Hey @samrg472 I am @utopian-io. I have just upvoted you at 25% Power!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations, your post received one of the top 10 most powerful upvotes in the last 12 hours. You received an upvote from @utopian-io valued at 79.67 SBD, based on the pending payout at the time the data was extracted.

If you do not wish to receive these messages in future, reply with the word "stop".

Congratulations @samrg472, this post is the most rewarded post (based on pending payouts) in the last 12 hours written by a User account holder (accounts that hold between 0.1 and 1.0 Mega Vests). The total number of posts by User account holders during this period was 2473 and the total pending payments to posts in this category was $1371.97. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Your post has been upvoted and resteemed to +144 follower by @afm007
Thanks.

This post upvoted 10% power by Utopy - [Support Contributors ]
image.png

Coin Marketplace

STEEM 0.29
TRX 0.07
JST 0.042
BTC 29824.02
ETH 2029.74
USDT 1.00
SBD 2.58